Kuika's Get User Roles action is used to list the roles assigned to a specific user. This action makes it easy to view a user's role-based authorization status within the system and can be used as a data source in scenarios requiring role control.
Get User Roles is particularly preferred in user management screens, admin panels, and situations where role-based access control is required.
Technical Features
Listing User Roles (Authorization Panel): Returns all roles associated with the specified username as a list.
Authorization Compatibility: The retrieved roles are compatible with the Authorization infrastructure and can be used for permission control, viewing, or condition-based operations.
Web & Mobile Support: The action is supported in both web and mobile applications.
Get User Roles Action Application Steps
1. Defining the Action in UI Design
Open your project on the Kuika platform. Go to the UI Design module and select the relevant screen.
Create a button, table row action, or page open trigger to list the user's roles (e.g., “View User Roles”).
Select the relevant element and add the Authorization → Get User Roles action from the + ADD ACTION menu, depending on the trigger event to be used.
2. Configuring Action Parameters
username (String – required): The username or email address of the user whose roles will be queried.
This field is typically:
CurrentUser.Email (to view the logged-in user's own roles)
Action Result (username information returned from Get User / Get User By Id actions)
Table selected row (the user selected from the user list)
Screen Input or Fixed Value
is connected via the Symbol Picker tool.
3. Optional Settings
Enable Audit Logs (Boolean – optional): When enabled, the process of querying the user's role information is added to the audit log records. This allows the system to track which user's roles were viewed, when, and through which action. It is recommended to enable this in applications that require authorization and security tracking.
Usage Scenario: Viewing User Roles
In an admin panel, the admin user selects a person from the user list and clicks the “View User Roles” button. This triggers the Get User Roles action, and all roles assigned to the selected user are displayed in a list on the screen. This allows you to quickly and clearly see what permissions the user has in the system.
Technical Risks
Invalid Username: Ensure that the value entered in the username field belongs to a user defined in the system.
Unauthorized Viewing: Viewing user roles should be restricted to authorized users only.
Audit Tracking: In corporate and regulation-mandated applications, it is recommended to enable the Enable Audit Logs option.