Here is the implementation of isUserInRole(String roleName) :
| public boolean isUserInRole(String roleName) | { | // Get the map role name to role link | Map securityRoleRefsMap = ((PortletContainerImpl)((ContainerPortletInfo)(PortletInfo)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE, PortletContainerInvoker.PORTLET_CONTAINER_INFO)).getContainer()).getSecurityRoleRefsMap(); | | // Process the role link | String roleLink = (String)securityRoleRefsMap.get(roleName); | if (roleLink == null) | { | if (securityRoleRefsMap.containsKey(roleName)) | { | // The role name exist without a role link value | return securityContext.isUserInRole(roleName); | } | else | { | // No role name is defined | return false; | } | } | else | { | // We have the role link value | return securityContext.isUserInRole(roleLink); | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038597#4038597 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038597 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user