AccessManager am = gc.getBean(AccessManager.class);
String id = Utils.getIdentifierFromParameters(params, context);
//--- check access
int iLocalId = Integer.parseInt(id);
if (!dataMan.existsMetadata(iLocalId))
throw new IllegalArgumentException("Metadata not found --> " + id);
//--- only allow the owner of the record to set its status
if (!am.isOwner(context, id)) {
throw new UnAuthorizedException("Only the owner of the metadata can set the status. User is not the owner of the metadata", null);