this.jaasConfigName = jaasConfigName;
}
public void checkEntityPermission(Object entity, EntityAction action)
{
Entity e = Entity.forClass(entity.getClass());
if (e != null)
{
String name = Seam.getComponentName(entity.getClass());
if (name == null) name = entity.getClass().getName();
Method m = null;
switch (action)
{
case READ:
m = e.getPostLoadMethod();
break;
case INSERT:
m = e.getPrePersistMethod();
break;
case UPDATE:
m = e.getPreUpdateMethod();
break;
case DELETE:
m = e.getPreRemoveMethod();
}
Restrict restrict = null;
if (m != null && m.isAnnotationPresent(Restrict.class))