The Security Manager interface provides methods to retrieve and query roles that may belong to a user. Methods include:
getRoles()
- returns an array of the role names belonging to the logged in user.
hasRole(roleName)
- returns true
when a logged in user holds a named role, false
otherwise.
Roles provide a way to restrict access to certain forms, pages and functions. For example, page behaviour may be changed and controls may be shown or hidden depending on the user's roles.