Hi,
I've tried to implement the same permission managment as seam example Seamspace. The declaration of the permission manager component, in my components.xml is as follow:
<security:permission-manager permission-store="#{org.jboss.seam.security.jpaPermissionStore}" />
To retrieve available action i call permissionMnager.listAvailableActions(target); like the example:
public List<String> getAvailableActions() {
return permissionManager.listAvailableActions(target);
}
target is initialize before in the createPermission method and not null:
@SuppressWarnings("unchecked")
@Begin(nested = true)
public void createPermission() {
target = (Application) permissionSearch.getTarget();
selectedUsers = new ArrayList<User>();
availableUsers = entityManager.createQuery("from UserAccount ua where ua.enabled = true").getResultList();
}
And get the following stack trace :
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.NullPointerException
java.lang.NullPointerException
at org.jboss.seam.security.permission.JpaPermissionStore.listAvailableActions(JpaPermissionStore.java:765)
at org.jboss.seam.security.permission.PermissionManager.listAvailableActions(PermissionManager.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
Any help ?
Thank you,
Fabrice