We are using following block of code to manage the roles,users and 
relationships beetween users and roles. The following code is written inside 
filterand the following block of code is called when user login into our portal 
application. Access previlleges portalnodes are generated based on following 
block codes.

We are having following issue when portal nodes generates for the user.
The user belongs admin role will get the all the portal nodes or tabs 
navigations. 
The user belongs to normal user will get the few portal nodes
or tabs navigations.
The scenario is first time admin user login into our portal application then 
logout close browser. it works fine
open new browser login as normal user. but still the access previlleges(portal 
nodes or tabs navigations) generated for admin role instead of normal user role.
Please help us to resolve the issue
import org.jboss.portal.identity.UserModule; 
import org.jboss.portal.identity.RoleModule; 
import org.jboss.portal.identity.MembershipModule;
 [...] 
UserModule userModule = (UserModule)new 
InitialContext().lookup("java:portal/UserModule"); 
RoleModule roleModule = (RoleModule)new 
InitialContext().lookup("java:portal/RoleModule"); 
MembershipModule memModule = (MembershipModule)new 
InitialContext().lookup("java:portal/MembershipModule"); 
User user = userModule.findUserByUserName(...);
Role role = roleModule.findRoleByName(...)
Set roleSet = new HashSet();
roleSet.add(role);
memModule.assignRoles(user,roleSet);

Regards
Marimuthu

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115424#4115424

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115424
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to