try {
context.populate(object);
int objectIdentifier = ((Integer)PropertyUtils.getProperty(object, "id")).intValue();
if (!SystemAuthorizer.get().hasPermission(context.getProjectId(),
SecurityHelper.getRemoteUserId(ThreadServletRequest.get()), object, permission)) {
throw new AuthorizationException("not authorized for object "+permission+": "+
objectClass+" "+objectIdentifier);
}
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {