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:
Subject:
Principal: vmatic
Principal: Roles(members:superadmin,Users)
<authorization> <grant> <principal code = "org.jboss.security.SimplePrincipal" name = "Users"/> <permission code = "org.jboss.test.NamespacePermission" name = "Project1/Documents/Public" actions = "r---"/> </grant> </authorization>