• Post Reply Bookmark Topic Watch Topic
  • New Topic

j_security_ckeck problem

 
dhanasekarit ramachandran
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using j_security_check authentication for my JSF application. i have 2 roles admin and superadmin (<role-name>admin</role-name><role-name>superadmin</role-name>). I have each 10 records in database. now im listing all 20 records wen i login both admin and superadmin. but my problem is i want to listout only admin role fields(10 admin role fields) wen i login as admin and listout another 10 superadmin fields when i login as a superadmin. can anybody give a suggession to solve this problem.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Does JSF provide access to the servlet request object? If so, then the HttpServletRequest.isUserInRole method provides a way to distinguish users.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!