}
}
private static boolean
isEntityRestricted(Object entity, EntityAction action) {
EntityRestrict entityRestrict =
entity.getClass().getAnnotation(EntityRestrict.class);
Restrict restrict = entity.getClass().getAnnotation(Restrict.class);
if (restrict != null) {
if (entityRestrict != null) {
if (Arrays.asList(entityRestrict.value()).contains(action)) {
return true; // restricted
} else {
return false; // not restricted
}
} else {