I need some insights in the role system of Ivy. I currently check whether a user does have a role by checking whether the current user does have a role with the ID of that role I am interested in. One problem is that I have to hard code the ID's, another problem that the ID's are hard to retrieve and they are different on Designer and Server. Is there a more simple way to find out whether a specific user does have a specific role? |
You can use the PublicAPI to do so:
If you want to check for the user that is currently logged in, it is even more simple:
|
If you want to use this as a BackingBean it has a slightly different syntax - maybe this helps someone...
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 06.08.2009 at 07:02
Seen: 5,690 times
Last updated: 10.04.2014 at 12:38