Learning Objectives
By completing this lesson, you will be able to:
-
Master how to create and configure application roles, and assign users to specific roles.
-
Understand how to configure record-level permissions, including the concepts of "Participants" and "Owner" of data.
-
Learn how to set field-level permissions to control which fields can be viewed or edited.
Scenario Case
The employee management system at MEGA Technology Ltd. has completed its core data modeling and page setup.
To further enhance data security and operational efficiency, the HR department aims to implement fine-grained permission settings, ensuring that access boundaries are clearly defined across different roles. The application is expected to meet the following permission requirements:
HR Role Requirements
Employee Role Requirements:
Steps
HR Role
-
Click the “User” icon in the top-right corner to access the role configuration page.
-
Click “+Create Role” to create a new role.
-
Name the role HR, choose Access to all app items (simple) and grant Permissions to view, edit, and delete all records. Then click Create.
-
After the HR role is created, click Manage Users to go to the role’s user management page. In practice, add the relevant people, departments, or positions. Users assigned to this role will automatically inherit its permissions.
Employee Role
-
Click “+Create Role” to create a new role named Employee, and choose Access to selected app items (Advanced).
-
Configure which Items(Worksheets and Custom Pages)and Views the employee role can access for viewing and editing. After checking the options, click Settings in the Data Privilege column to configure Record-level permissions.
-
In the Employee Directory section, go to the Record Range tab and allow view all and edit all records. Then switch to the Field tab to configure Field-level permissions.
-
In the Field tab of the Employee Directory, allow editing only for Phone Number, Email, and Employee Photo.
-
In the Course Table section, click the Setting and allow the role to view all records.
-
In the Course Participation Record, set the role to view participated records and edit all records.
(Note: Edit permission is based on view permission, so this means they can edit all of records that they joined.)
-
In the Field tab of the Course Participation Records, allow editing only for Course Rating and Feedback&Suggestions fields.
-
Once configuration is complete, close the popup and click Create to finalize the Employee role. In practice, assign the appropriate users to this role.
Role Debug
-
To verify if the role settings meet requirements, enable Role Debug in the top-right corner.
-
After setup, return to the application page. The admin can use the Select Role menu in the top-right corner to test permissions from the perspective of different roles.
Hands-on Practice
Now, click the "Open the Practice App" button in the upper right corner of the page to access the hands-on application designed for this course, and start practicing!