try
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)
	public static void check(DomainObject reciever, AccessControlPredicate<DomainObject> predicate)	{		try		{			AccessControl.trap();			if (AccessControl.trapLevel.get() == 0)			{				Person requester = AccessControl.getUserView().getPerson();				boolean result = false;				if (reciever instanceof Content)				{					result = ((Content) reciever).getOwners().contains(requester);				}				result |= (predicate != null && predicate.evaluate(reciever));				if (!result)				{					StringBuilder message = new StringBuilder();					message.append("User ").append(requester.getUsername()).append(" tried to execute access content instance number").append(reciever.getIdInternal());					message.append("but he/she is not authorized to do so.");					throw new IllegalDataAccessException(message.toString(), requester);				}			}			AccessControl.untrap();		}		catch (Throwable ex)		{			AccessControl.untrapAll();			StringBuilder message = new StringBuilder();			message.append("An event occured when running privileged code");			message.append("The event was: ").append(ex);			throw new IllegalAction(message.toString());		}	}