Issue Type: Bug Bug
Affects Versions: PLINK_2.6.0.Beta3
Assignee: Anil Saldhana
Components: IDM
Created: 17/Feb/14 6:23 AM
Description:

Following the example "jboss-picketlink-quickstarts/picketlink-authorization-acl," I have problems in the verification of 'ACL using Identity.hasPermission (...). While debugging I noticed that no PermissionVoter is injected in the context of CDI. Looking at the source I found no @ Producer to utilize the following voter PersistentPermissionVoter.

I created a simple @ Producer:

@ApplicationScoped
public class PermissionVoterProducer {

private PermissionVoter voter;

@Inject
private PartitionManager partitionManager;

@Inject
public void init()

{ voter = new PersistentPermissionVoter(partitionManager); }

@Produces
public PermissionVoter createPermissionVoter()

{ return voter; }

}

But when I try to check a permission I get the following exception:

Caused by: java.lang.NullPointerException
at org.picketlink.idm.jpa.internal.JPAIdentityStore.lookupPermissionEntity(JPAIdentityStore.java:1594)
at org.picketlink.idm.jpa.internal.JPAIdentityStore.grantPermission(JPAIdentityStore.java:1634)
at org.picketlink.idm.internal.ContextualPermissionManager.grantPermission(ContextualPermissionManager.java:55)
... 66 more

Checking the permissions on the database has been correctly entered with the following code:

User user = (User) identity.getAccount();
permissionManager.grantPermission(user, association, "UPDATE");

Project: PicketLink
Labels: acl
Priority: Major Major
Reporter: Marco Ronconi
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira