[Drupal] How to restrict view page access based on role or permission?

| | 1 min read

If you are using the Views module to create a page that only specific users should be able to access, then a simple configuration will do the trick for you. Basically, we can set views access control by role or by specific type of permission that a user has. Here is how this can be configured in each view.

Step 1: Go to 'admin/structure/views' and edit the view.

Step 2: Click on the link next to 'Access' option.

view1.png

Step 3: Select the type of access restriction to be set.
Views provides access control by role or permissions.

Role

view2.png

  • Select the role you want to set.

view3.png

OR

Permission

view4.png

  • Select the permission you want to set.

view5.png

Step 4: Finally, save the view.

For more help, please get in touch with us.