- Print
- DarkLight
- PDF
Description
Type: Array
Returns a Javascript array of all security roles the user belongs to.
Examples
// display all roles user belongs to in the debugger
for (var i in user.roles) {
debug.log(user.roles[i]);
}
Remarks
A role is a security term that refers to a type of user and the set of permissions they have.
IT administrators assign roles to users (according to their job specifications) when the user's account is first set up or when management requests changes. These roles often dictate which product features a user can access.
For example, a Dr. Know user could be a technician using your app to collect certain data elements during patient testing. Later, a physician might use your app to review this information and complete a report. Each user would belong to a distinct role. Users can also belong to more than one role.
You can use this information within your scripts to deliver role-specific features and user experience enhancements.