Kullanıcı Kılavuzu

Add User To Role

Add User To Role

Kuika's Add User To Role action is used to add a specific user to a role defined in the system. In this way, users' roles can be dynamically managed and groups within the application can be configured. As part of the authorization system, the action helps to indirectly determine users' access to certain content or features. Role-based access permissions are managed by defining them in the Authorization field in the Properties panel.

Technical Specifications

  • Role Assignment (Authorization Panel): Adds the user to a defined role in the system. It allows you to match users in your application with a specific task or authorization groups. Users with roles can be defined dynamically or statically through the Authorization field in the Properties panel.
  • Authorization Matching: The authorizations of the users to be assigned to the role are determined from the Authorization settings.
  • Web & Mobile Support: The action is compatible on both web and mobile platforms.

Add User To Role Action Implementation Steps

1. Defining Action in UI Design

  1. Open your project on the Kuika platform.
  2. Switch to the UI Design module and select the relevant screen.
  3. Create a button (like “Assign Role”).
  1. Select the button and add the Authorization > Add User To Role action according to the desired trigger event (Initial Actions, OnClick, OnBlur, etc.) from the + ADD ACTION menu.

Configure Action Parameters

  • Username (String - required): The user's e-mail address in the system.
    • It is usually defined using data sources such as Action Result, Current, Form Component, Screen Input or Fixed and can be linked via Symbol Picker.
  • RoleName (String - mandatory): The name in the system of the role to which the user will be assigned.
    • This value enables the user to activate access permissions by including the user in a specific authorization group.
    • It is usually defined using data sources such as Action Result, Current, Form Component, Screen Input or Fixed and can be linked via Symbol Picker.

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.

Add User To Role Action Advanced Customizations

  • Dynamic Role Assignments:
    • Dynamic Assignment with Role Parameter
      • By adding dynamic values to the Role parameter, you can assign different roles depending on the status of the user. For example, if a user will be rewarded after a certain event or campaign, a special role can be assigned to them. These are dynamic values:
      • From the action result via the symbol picker,
      • By manually defining as fixed,
      • Taken via Component,
      • Roles retrieved from SQL database or C# can be dynamically categorized not only with Role List but also with different symbol picker categories. Thus, each category enables a more customized role assignment based on the status of the users.
    • Fetching Roles with SQL or C#
      • Roles can be retrieved from a database or an in-system service.
      • Role list can be imported instantly from the system and transferred to the RoleName field.
      • Example: The “Premium User” role is assigned to the user who receives premium membership.
  • Integrating User and Role Management:
    • The action can be combined with the registration form or profile update screens.
    • When certain fields are filled in, the user can be automatically assigned predefined roles.
    • Example: When the user fills out a form on the application and the user profile is updated, roles such as “Editor” or “Admin” can be automatically assigned based on certain criteria.
  • Assigning Multiple Roles:
    • This action can be used more than once to assign multiple roles to the user.
    • Example: The same user can be assigned both “Admin” and “Editor” roles.

Technical Risks and Controls

  • Wrong Role Definition: Make sure that RoleName is a role defined in the system.
  • Unauthorized Access: Ensure that the action is executed only by authorized users.
  • Missing Authorization Scope: The required Authorization settings of the assigned role must be made.

Add User To Role action allows you to create role-based access control by assigning users to specific roles in Kuika applications. It offers both a flexible and secure authorization infrastructure with advanced integration support, dynamic parameters and the ability to assign multiple roles.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar