--- title: "system.security.getRoles" description: "Finds the roles that the currently logged in user has, returns them as a Python tuple of strings." --- # system.security.getRoles > Finds the roles that the currently logged in user has, returns them as a Python tuple of strings. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.security.getRoles()` ### Parameters Nothing ### Returns **Tuple** - A list of the roles (strings) that are assigned to the current user. ### Scope Vision Client ## Code Examples ```python title="Example #1" # This would run on a button to prevent certain users from opening a window if "Supervisor" in system.security.getRoles(): system.nav.openWindow("ManagementOnly") else: system.gui.errorBox("You don't have sufficient privileges to continue") ```