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
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();