Permission rules can be applied to pages to restrict what different user groups can view, edit, create or delete in your application. In this example, we will only allow users that belong to the user group Employees to access the employee directory.
Creating Page Permissions
Each page in your app can contain different sets of rules to determine who can view and edit information. There are two ways to open the permissions settings:
- Click on the page tab from the editor. I.e. Home
- Open the page selector and click on the settings button
1. Switch to the Access Control tab in page settings
Here you can view, edit and create new permission rules for the selected page.
Creating a Rule
Let’s create a rule for this employees directory page to restrict access to the users group employees only. You can learn more about user groups here.
By default, each page is viewable by everyone (including the public). Let’s start by removing this rule from the page.
- Click on the delete (bin) button to remove public access
If you try accessing the page as an end user, it will now take you to the log in page
- Click on Add Rule to create a new rule. There are 3 options to choose from:
- Allow Public Access (this is the rule we just removed)
- Create New User Group e.g. Employees
- Add existing User Group (e.g. you already have a user group called Employees)
- Create a new group called Employees with a meaningful description
Users who belong to the user group Employees can now access the page.
Managing users in a user group
To view and update users in a group:
- Navigate to the User Groups & Rules page from the left sidebar
- Click on the View button of the user group
- Switch to the users tab