aspose file tools*
The moose likes JSF and the fly likes Primefaces picklist permission/role user example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Primefaces picklist permission/role user example" Watch "Primefaces picklist permission/role user example" New topic
Author

Primefaces picklist permission/role user example

Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
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

Joined: Jun 25, 2001
Posts: 15641
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mat Anthony
Ranch Hand

Joined: May 21, 2008
Posts: 229
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

Joined: Jun 25, 2001
Posts: 15641
    
  15

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

Joined: May 21, 2008
Posts: 229
Ok Tim,
no problem, I will have get my hands dirty.

Mat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Primefaces picklist permission/role user example
 
Similar Threads
Render textfield based on other component
How to reset pickList in JSF
Problem with sessionScoped
JSF 2 Ternary Operator Problem
Preselection on Pick List?