Insites Docs Developers guide PermissionsAssociating an Authorization Policy with a Page

Associating an Authorization Policy with a Page

Last updated on August 12, 2024.

This document discusses associating an Authorization Policy with a page.

Prerequisites

To follow the steps in this tutorial, you must understand the concept of Permissions and have already created a Page and an Authorization Policy.

Steps

Associating an Authorization Policy with a page is a two-step process:

  • Step 1: Edit the page configuration
  • Step 2: Add the 'authorization_policies' key to the page configuration

Step 1: Edit the page configuration

Create a custom page where you only want users with the first name to be able to access:

app/views/pages/john-private-page.liquid

Step 2: Add the 'authorization_policies' key to the page configuration

Add the key to page configuration and specify the Authorization Policy for the page:

app/views/pages/john-private-page.liquid

Next Steps

Congratulations! You know how to associate an Authorization Policy with a page. Now you can learn about handling violated Authorization Policies: Handling a Violated Authorization Policy

Have a suggestion for this page?

Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.