Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

disable the links in jsp page

 
smyle khanna
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....
i have 2 jsp pages..one is the login page n other main page which is displayed after the login page.this main page contains menu coded in javascript n dhtml.
the user are divided into several groups and depending on the type of the group of user ,certain menu links in the main page must be disabled.
how can i disable or prevent the user from access certain links in the menu for which he has no permission?
plz help me out
thanks in advance
Smyle
 
C. P. Chouksey Raisen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
during creating UserID, u add any prefix or suffix string which show u an identity of a particular group. Store this user id into session when login, and on the click event of ur menu
u just check that substring (prefix or suffix string which u added during userID creation).
execute ur operation if this match with ur group, nothing otherwise.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That or you could simply use standard J2EE constructs like HttpRequest.isUserInRole().

Kyle
 
smyle khanna
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
thanks a lot 4 the responses
the UserGroup id i have passed using a session...but i dont know how exactly to disable or restrict the user of the particular group from access the menu links....
i cant use seperate menu for each group since the number of groups are more,so in the main page according to the group rights the links must be enabled or disabled or provide sum alert or sumthing which prevents the user from accessing it.
,overall the user group not having rights must not b allowed to access tht menu links........
plz help me outta this...it wuld b more helpful if i get guidelink
thanks in advance
Smyle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic