1. Authorization on Elements

Authorization on elements is the process of controlling a specific user's right to access specific elements. It allows users to view and edit certain fields only in line with the roles assigned to them.

1.1. Creating a Role

Before assigning authorization to elements, roles must be created. For example, let's define two different roles such as “Administrator” and “Staff”.

  1. After logging into the Kuika platform, open the project you will work on from the “Apps” screen.
  2. Then click on the “UI Design” module.
  3. Add an element from any Elements panel in your application and click on the element you added.
  1. In the Authorization field in the Properties panel, if the “All Roles Access Switch” option is active, disable it.
  1. Then under the Roles heading, click the +NEW ROLE button.
  2. Define your new role. For example, enter the name for the “Staff” role and click the CREATE button. Repeat this process for the “Administrator” role.

The roles you created are stored in the KRole table in the Datasources module. Also, SQL queries can be written using the KUserRole table to find out which role users are in.

By calling these operations in the UI Design module, you can assign user roles or perform role-based authorization operations. For example, an Administrator can also have a Staff role. You can remove a role of the Administrator with the action OnClickAuthorizationRemove User From Role.

1.2. Element Visibility by Roles

Which user role can view the elements can also be set in the Authorization field. For example, a Row element can be made visible only to users with the Administrator role. In this case, a user who is not in the Administrator role will not be able to see this Row element.

To make an element viewable only, you can disable the Hide Switch for that element. In this case, users cannot make changes to this Row, but they can view it.

1.3. Start Screen Assignment by Roles

Depending on the user's role, it is possible to show different start screens when opening the application.

  1. Select the start screen according to the user role from the Select Box.
  2. Make the assignment by clicking the CREATE button.

If you want all roles to view the same elements, you need to activate the All Roles Access Switch. However, if you want to provide anonymous access, you need to activate the Anonymous Access Switch.