Usage Scenario: Authorizing a User by Assigning a Role

In a training application, the user whose registration has just been completed is given the authority to edit the form by assigning the "Editor" role in the system. This can be done through a button triggered after the user completes the form.

Adding Role Assignment Action After User Registration

  1. Enter the UI Design module and drag and drop a Button element from the Elements panel on the left side.
  1. In the Properties panel, enter a phrase like “Assign Role” or “Authorize User” in the Label of the button.
  2. Select the button and choose + ADD ACTION from the menu OnClick → Authorization → Add User To Role action.

Configuring the Add User To Role Action

  • UserName: “mary.watson@kuika.com” (The name of the user to be assigned a role, can be dynamically retrieved from the form.)
  • RoleName: “editor” (The system-defined name of the role to be assigned.)

With this configuration, one click is enough to authorize the user in the system. When the action runs, the user is added to the relevant role and has all permissions and access to that role.