auth:hasRole
User/role tag to check the role for a certain user. Class returns TRUE if the user has the given role and FALSE otherwise if an 'id' was given as an argument. If the role is set for the given user then the body content will be rendered, otherwise the body content will not be rendered.
<auth:hasRole id="testRole" role="ADMIN"/> <util:valueof param="testRole"/>
Syntax
<auth:hasRole id="..."? role="..." section="..."? sectionId="..."? user="..."? userId="..."?> ... </auth:hasRole>
Attributes
id
, no runtime expressionsThe name of the scripting-variable.
role
, mandatoryThe name of the role the user should have.
user
The name of the scripting-variable where to get the user from. This can be a UserData, PresentationPerson or Person object. Default it uses the logged in user.
userId
Id from the escenic user. Default it uses the logged in user.
section
The name of the scripting-variable where to get the section form. This can be a PresentationSection or Section object. Default it uses the section your in.
sectionId
The id from the section you want to check. Default it uses the section your in.