userRole
To return the role of the current or a given user
This function finds out for you, which role a user has been assigned. By default Ninox has 2 roles in stock:
- admin
- editor
But you can create new roles on your own and assign them to the collaborators in your workspace.
If you want to check all roles, which are assigned to a user, use
userRoles().
userRole()
userRole(user)
string
userRole()
To return the role of the current user.1
userRole()
Result: admin (if the current user has admin rights) or editor (if the current user has editor rights.
userRole(myUser)
To return the role of a given user.Select Angela Merkel in the User field.
1
userRole(User)
Result: exChancellor (if Angela Merkel definitely has the extra created role exChancellor)
Last modified 11mo ago