🔐

Page Permissions

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:
  1. Click on the page tab from the editor. I.e. Home
    1. notion image
  1. Open the page selector and click on the settings button
    1. notion image
       
1. Switch to the Access Control tab in page settings
notion image
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.
notion image
 
By default, each page is viewable by everyone (including the public). Let’s start by removing this rule from the page.
  1. Click on the delete (bin) button to remove public access
notion image
If you try accessing the page as an end user, it will now take you to the log in page
notion image
  1. Click on Add Rule to create a new rule. There are 3 options to choose from:
    1. Allow Public Access (this is the rule we just removed)
    2. Create New User Group e.g. Employees
    3. Add existing User Group (e.g. you already have a user group called Employees)
notion image
  1. Create a new group called Employees with a meaningful description
notion image
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:
  1. Navigate to the User Groups & Rules page from the left sidebar
notion image
  1. Click on the View button of the user group
  1. Switch to the users tab
notion image