1 Reply Latest reply on Sep 2, 2008 12:08 PM by Adrien Orsier

    Trouble using PermissionManager

    Adrien Orsier Newbie


      I'm currently trying to use PermissionManager to handle my permissions, and I found something I'd like to have some enlightement on.
      When granting a Permission, am I obliged to manually create instance of a seam Role ?
      I'm currently doing something like:

      PermissionManager.instance().getPermissionStore().grantPermission(new org.jboss.seam.security.permission.Permission(permissionName,permissionAction,new org.jboss.seam.security.Role(instance.getName()))); 

      That's the only way I found to be able to get through this code of JpaPermissionStore, since my Role isn't an instance of org.jboss.seam.security.Role and that this class doesn't seem to be extendable:

       protected boolean updatePermissionActions(Object target, Principal recipient, String[] actions,
               boolean set)
            boolean recipientIsRole = recipient instanceof Role;
               if (recipientIsRole)