Skip to content

SandeepDev365/HideLists

Repository files navigation

hide-lists-wp

Summary

SPFx Webpart to Hide/UnHide lists in a Site Collection

HideLists WebPart

Used SharePoint Framework Version

version

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Prerequisites

Access to SharePoint Site

Solution

Solution Author(s)
src Sandeep Unnikrishnan

Version history

Version Date Comments
1.0 February 27, 2022 Working Version

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • Ensure that you are at the solution folder
  • in the command-line run:
    • npm install
    • Update your SharePoint Site Url in serve.json
    • gulp serve

Features

As Site Admins we may need to hide some lists or libraries in Site Contents from other users who have access to the lists/libraries.

For example: we may have created a PowerApps form and need to hide master lists or Logs list which has to be kept hidden from end users though they have Read permissions or Edit permissions to the lists/libraries.

So that once the list is hidden, users cannot access the list directly from Site Contents or without knowing list name or list URL.

There are multiple ways to do this by using PowerShell Scripts, Rest Api & MS Flows.

Here we will be achieving the same functionality using SPFx Webpart, which we can just add to a Site Collection and it will list out the lists and libraries in the site and Site Admin can Hide/Unhide lists with a simple button click.

This Webpart will be accessible only to users with Site Collection Admin access.

We will be using PnP Js library to get relevant SharePoint lists and libraries from current Site Collection and use "Hidden" property of lists to hide/Unhide.

HideLists WebPart

References

About

SPFx Webpart to Hide lists in SharePoint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published