• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

managing users , roles , privileges

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have worked using strut for sometime and i was using the tag


to show and hide the links/buttons and privileges depending upon the role of the user and its privileges

for example some users have the privileges to see the 'list user management' icon link and some not.
and in the level of the page also , that is not all the users who have privileges to view the users list, can edit or delete.

is there any component similar to logic:equal in strut , or how i can i manages the users , their roles and their privileges

by the way the roles and privileges are dynamic data stored in db .

Thanking you in Advance
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any reply
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can hide elements by using the redered attribute:
 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Wouter Oet ....... it is exactly what I was looking for .
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although the Apache Tomahawk tag library has tags which have direct role support, most JSF does not, unfortunately. So the "rendered" attribute is the usual solution.

In general, however, it's better to keep complex expressions off the View and in the backing bean. So instead of :


You might want something simpler and more targeted, such as

where

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic