0 Replies Latest reply on Mar 25, 2004 8:02 AM by vmatic

    Granting permission to a role

    vmatic Newbie

      I have noticed, while trying JUnit test on org.jboss.security, that permissions which are granted to the role are not applied to the subject (user) to whom this role is assigned.

      Login process pass just fine and the initialized subject looks like:

      Principal: vmatic
      Principal: Roles(members:superadmin,Users)

      e.g. role Users is assigned to vmatic.
      further if I grant permission to the role Users:

       <principal code = "org.jboss.security.SimplePrincipal" name = "Users"/>
       <permission code = "org.jboss.test.NamespacePermission" name = "Project1/Documents/Public" actions = "r---"/>

      AccessController.checkPermission(..); on vmatic Subject breaks, while if grant is made directly to the user everything works fine (permission is verified by AccessController).

      Is this normal behavior?