14 Replies Latest reply on Mar 1, 2012 4:05 PM by Gerry Matte

    Configuring JpaPermissionStore

    riboriori riboriori Newbie

      Hi all
      i've succesfully configured (within seam-beans-xml file) JpaIdentityStore; now i'm trying to configure JpaPermissionStore.
      I report a code snippet below:





      <beans      xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xmlns:s="urn:java:ee"
                xmlns:security="urn:java:org.jboss.seam.security"          
                xmlns:permission="urn:java:org.jboss.seam.security.permission"
                xmlns:plidm="urn:java:org.jboss.seam.security.management.picketlink" 
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  http://jboss.org/schema/cdi/beans_1_0.xsd">
      
           <permission:JpaPermissionStore >
                <s:replaces/>
                <permission:identityPermissionClass>com.mycompany.domain.entity.security.IdentityPermission</permission:identityPermissionClass>
           </permission:JpaPermissionStore>
      
      </beans>



      in a controller i test following code:




      @Inject PermissionManager permissionManager;
      
      public vod testEnabledPermissionManager()
      {
      System.out.println(permissionManager.getPermissionStore().isEnabled());
      }



      Where permissionStore interface is an instance of JpaPermissionStore.
      The output on console says false.
      What can i do in order to configure correctly JpaPermissionStore?


      Regards.