system.user.getRoles
This function is used in Python Scripting.
Descriptionβ
Returns a sequence of strings representing all of the roles configured in a specific user source.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.user.getRoles(userSource)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | userSource | The user source to fetch the roles for. |
Returnsβ
List - A List of strings that holds all the roles in the user source.
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Example #1
# This example will print a list of all user roles in the default user source:
roles = system.user.getRoles("")
for role in roles:
print role