0
userHasRole
In this article
To return Yes (true
) if a user has a given role
Check with this function if the current or a given user has a specific role.
Syntax
userHasRole(string)
userHasRole(user, string)
Return
boolean
Examples
userHasRole(role)
To return Yes (true
), if the current user has a given role.
Result: Yes (true
) if the current user has the admin role
userHasRole(myUser, role)
To return Yes (true
) if a given user has a given role.
Result: Yes (true
) if the creator of the selected record has the admin role
See also
user
which returns the current or a specific user.
Do you want to dive deeper into the topic? Take a look at the corresponding part of our video tutorial.
Reply
In this article
Related articles
Content aside
- 4 mths agoMon, November 25, 2024 at 12:46 PM UTCLast active
- 41Views
-
1
Following