public static void check(DomainObject c, AccessControlPredicate<DomainObject> predicate) { Person requester = AccessControl.getUserView().getPerson(); boolean result = false;  if (c instanceof Content) { result = ((Content)c).getOwners().contains(requester); } result |= (predicate !=null && predicate.evaluate(c));  if (!result) { StringBuilder message = new StringBuilder(); message.append("User ").append(requester.getUsername()).append(" tried to execute access content instance number").append(c.getIdInternal()); message.append("but he/she is not authorized to do so");
public static void check(DomainObject c, AccessControlPredicate<DomainObject> predicate) { Person requester = AccessControl.getUserView().getPerson(); boolean result = false;
	public static void check(DomainObject c, AccessControlPredicate<DomainObject> predicate)	{		Person requester = AccessControl.getUserView().getPerson();		boolean result = false;        		        if (c instanceof Content) {            result = ((Content)c).getOwners().contains(requester);        }		result |= (predicate !=null && predicate.evaluate(c));				if (!result)		{			StringBuilder message = new StringBuilder();			message.append("User ").append(requester.getUsername()).append(" tried to execute access content instance number").append(c.getIdInternal());			message.append("but he/she is not authorized to do so");			throw new IllegalDataAccessException(message.toString(),requester);		}	}