getSecuritySystem().managedDetails(iObject, copy.getDetails()); AdminAction action = new AdminAction(){ public void runAsAdmin() { Permissions p = new Permissions(perms); copy.getDetails().setPermissions(p); iUpdate.saveObject(copy);
copy.getDetails().setPermissions(perms); getSecuritySystem().doAction(copy, new SecureAction(){ public <T extends IObject> T updateObject(T obj) { update.flush(); return null;
    public void changePermissions(final IObject iObject, final Permissions perms)    {    	final IObject copy = iQuery.get(iObject.getClass(), iObject.getId());    	getSecuritySystem().managedDetails(iObject, copy.getDetails());    	AdminAction action = new AdminAction(){    		public void runAsAdmin() {    	    	Permissions p = new Permissions(perms); // FIXME ticket:215    	    	copy.getDetails().setPermissions(p);    	    	iUpdate.saveObject(copy);        		}    	};    	getSecuritySystem().runAsAdmin(action);    }