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

Primefaces picklist permission/role user example

 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
has anybody come across a primefaces picklist example were you can assign roles/permissions to users. I currently have a jsf web spring security3 application that I would like to use it for.

Mat
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18162
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, user and role definitions are kept in some sort of external store (database, LDAP, whatever), and the definition and assignment of those elements is basically just a standard database/LDAP application.

Note that if you are using the container security system - which I believe the stock Spring security does - changes to user roles require the user to log out and back in again. That's a protection against the user being able to slip through a possible loophole where they start an application function under one set of security rules and the rules change in the middle of the operation.
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,
thanks for your reply. I'm trying to develop a Admin screen that would allow an Administrator to select add/delete a Role to/from a User. I would like to use Primefaces pickList where you would select a user and be able to add or remove roles for that user. I'm being a bit lazy but at the same time I dont want to re-invent the wheel if somebody else has already done most of it.

Mat
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18162
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because so much of this code can vary depending on what sort of storage is being used to contain your credentials and what names they are filed on, don't expect you will find much in the way of ready-build components.

In any event, the picklist control itself is the hardest part.
 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok Tim,
no problem, I will have get my hands dirty.

Mat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic