This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help in JSP + menus  RSS feed

 
barbie amr
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am presently working on a project. I just wanna help from u.

1. After the login page, we have to come to main page. In this page based on the user (login user), some restrictions are provided. I dont want the user to enter into that module if he/she is not provided the right for that module. So in the main page itself, based on the user, only those modules which he is given right to access should be enabled and the rest all should be disabled. Can anybody help me with code for such a type of situation.
2. In main page I have different menus (coolbar menus), based on the user when i click on that paricular menu he should be either allowed to go into that module or an alert should be displayed saying he is given rights to access the module.

The menu is created like this.....

oCMenu.makeMenu('top2','',' UserGroupMaster','/default.html')
oCMenu.makeMenu('sub21','top2','Add UserGroup','User_GroupCreate.jsp?param=add')
//oCMenu.makeMenu('sub210','sub21','New tutorials','/tutorials/index.asp')
//oCMenu.makeMenu('sub211','sub21','Tutorials archive','/tutorials/archive.asp')
oCMenu.makeMenu('sub22','top2','Edit UserGroup','User_GroupCreate1.jsp?param=edit')
//oCMenu.makeMenu('sub220','sub22','New articles','/articles/index.asp?show=new')
//oCMenu.makeMenu('sub221','sub22','Article archive','/articles/archive.asp')
oCMenu.makeMenu('sub23','top2','Delete UserGroup','User_GroupCreate1.jsp?param=delete')

Here itself based on the rights assigned to the user, he should be either allowed or not allowed to enter that module.
For eg.. frm above code, For usergroup master module, that particular user is not allowed to add a new group but is allowed to edit or delete the group. How and where do i check this condition? Could anybody tell me as to go abt this, Or is there any other way to handle such a situation
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know about that Coolbar menues. You can solve the problem as follows:

Define the groups of users and their relative task tables in Database that which group can perform which tasks. Then in that main page get the user group and then make decision to which group the user belongs and which menus should be displayed for that user. Don't display the menus that user can't perform task.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!