public boolean onPreInsert(PreInsertEvent event) {

    EJBMethodPermission insertPermission =
        new EJBMethodPermission(
            event.getPersister().getEntityName(), HibernatePermission.INSERT, null, null);

    JACCPermissions.checkPermission(event.getEntity().getClass(), contextID, insertPermission);

    return false;
  }
Esempio n. 2
0
 public boolean onPreInsert(PreInsertEvent event) {
   validate(event.getEntity(), event.getSource().getEntityMode());
   return false;
 }