aspose file tools*
The moose likes JSP and the fly likes Creating users and controlling access based upon roles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Creating users and controlling access based upon roles" Watch "Creating users and controlling access based upon roles" New topic
Author

Creating users and controlling access based upon roles

Praveen Kumar Singh
Greenhorn

Joined: Oct 05, 2009
Posts: 18

hi,

i am creating a page where i need to give user access to some pages on the basic of his role.

this page can be common for all user or may be there will be different pages on the basic of his role.

Please help me on this & tell me how can i do this.

Praveen Kumar Singh


PKS
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3097
    
  33

Praveen Kumar Singh wrote:hi,

i am creating a page where i need to give user access to some pages on the basic of his role.

this page can be common for all user or may be there will be different pages on the basic of his role.

Please help me on this & tell me how can i do this.

Praveen Kumar Singh


One approach which immediately came to my mind:
You can have "Roles" associated with each user. You could store the User details in a Session and based on the User's role- You can give access to the page the user is eligible to view.
That way In the same page you could give access to different controls based on the User's role- Like the Moderation of Forum posts.

Am not aware of other ways, other members will be able to add more to this.

Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating users and controlling access based upon roles