Controlled Access – Application extension

Introduction

This SPFx application extension is an advanced tool designed to restrict access to SharePoint Modern pages based on predefined and dynamic configurations maintained in a settings list. This extension ensures that even users with contribute, or full control permissions can be restricted from accessing specified content.

Download from Controlled Access (microsoft.com)

Core Capabilities

  • Restricts access to SharePoint Modern pages based on settings list configurations: This ensures that only authorized users can access specific content.
  • Overrides user permissions: Provides higher control over content access by overriding existing user permissions.
  • Configurable redirection options for unauthorized users: Allows administrators to set up custom redirection URLs for users who do not have access.
  • Option to display an access denied dialog: Before redirecting users, an access denied dialog can be displayed to provide more information on their access.
  • Management of allowed and blocked users or groups for specific pages: Administrators can specify which users or groups are allowed or denied access to certain pages.
  • Access Control for Lists and Libraries: The extension includes the capability to manage access to SharePoint Modern pages, lists, and libraries. By specifying the names of lists or libraries in the settings list, administrators can effectively allow or block users from accessing these resources.

Configuration Overview

The settings for the Controlled Access extension are managed through a settings list named ControlledAccessList that is automatically created upon the first access of the extension. The following configurations can be maintained in the settings list:

Note: Since the list creation happens when the extension is accessed, it is recommended that the user who has permission to create list should access the extension.

List Fields

NameTypeWhat for?
TitleDefault Title fieldShould not change the title value for the default items.
ConfigValueMultiline of textActual configuration values
AllowedUsersPerson or GroupPeople or groups allowed. Users or groups that are allowed to access the configured pages.
BlockedUsersPerson or GroupPeople or groups allowed. Users or groups that are blocked from accessing the configured pages.

Automatic Settings

  1. RedirectTo: The URL to which users should be redirected if they do not have access. This ensures users are guided to a proper page without access disruptions.
  2. RestrictedPages: This field holds the list of page names (excluding extensions like .aspx) or list names that need restricted access. Multiple items with the same title can be added to handle different pages or lists.
  3. ShowAccessDeniedDialog: A boolean field (true/false) that decides whether an access denied dialog should be displayed before redirecting the user to another page.
  4. DialogDescription: The text to be displayed in the access denied dialog, providing users with context before they are redirected.

Manual Settings

  1. AllowedUsers: Specifies the list of users or groups allowed to access specific content. This ensures only authorized individuals can view or change the restricted pages.
  2. BlockedUsers: Specifies the list of users or groups that should be denied access. This allows administrators to effectively manage and secure content by restricting access to certain users.

Usage Instructions

Installation

Upon installation, the Controlled Access extension will automatically create a settings list with the necessary configuration fields. Administrators can then change these fields to tailor the access control policies to meet their organizational needs.

Configuring Access Restrictions

1. Navigate to the settings list created by the extension.

2. Populate the RestrictedPages field with the names of pages or lists that require restricted access.

3. Specify the RedirectTo URL to direct unauthorized users to a page.

4. Set the ShowAccessDeniedDialog field to true or false, based on whether you want to display an access denied dialog.

5. If displaying a dialog, fill in the DialogDescription with the desired message.

6. Add users or groups to the AllowedUsers field to grant access. 7. Add users or groups to the BlockedUsers field to deny access.

Conclusion

The Controlled Access SPFx extension is a powerful tool for managing page access in SharePoint Modern sites. By using the settings list, administrators can enforce access controls and enhance the security and user experience of their SharePoint environment.

For further assistance, please watch this video (Controlled Access YouTube Video), and also you are always welcome to send email to SUDHARSAN_1985@LIVE.IN.

Leave a comment