on 08-04-2005 12:58 PM
I have an asp page where links are given to pages in the portal using epcf navigation. Is there a way by which i can restrict the pages displayed depending on the user who is logged in.The asp page will be visible to all but the links will work only depending on who has logged in.
Please help.
hi Aamod,
If you want the links to be enabled for any user assign a particular role to user.
Get the role of the user logged in using this piece of code
IUser user = request.getUser();
Iterator roles = user.getRoles(true);
while (roles.hasNext()) {
try {
String uniqueID = roles.next().toString();
IRole userRole = UMFactory.getRoleFactory().getRole(uniqueID);
if(userRole.getDisplayName().equalsIgnoreCase("elearningclient"))
response.write("Role is :"+userRole.getDisplayName());
} catch (Exception e) {
response.write(""+e);
}
based on the role you can activate or deactivate the links.
regards,
Rahul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Look into permission. You can assign permission to page and restrict the visibility.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.