How to prevent team site members from editing SharePoint pages
In this post, I am going to describe how to get around a pretty damaging issue in SharePoint Sites. It is the ability of regular members of the site to edit pages, including the homepage of the site. In SharePoint, pages are treated just like any other content (documents, events, etc.). This means that if the users have Edit or Contribute permission level (those in Members Group), not only these users can add/edit/delete documents from a document library, but they can also modify the pages!
Now that we are clear what I am talking about, let’s see what the option are to fix this little annoyance.
Option 1: Prevent editing of all pages
If you want to prevent editing of all pages on your site – that’s easy to accomplish. All site pages on a site are stored in the Site Pages library. It is just like a document library, but just for site pages. By default, just like a document library and other web parts, it inherits security settings from the site. So if you want to prevent team members from editing the pages on a site, what you need to do is break inheritance and make this library read-only for Members Group. Here is how to do this:
- While on a site, click Gear Icon > Site Contents
- Where you see a list of contents of your site, click on Site Pages library
- Next, we need to break inheritance for this library from the rest of the site. To do this, click on Gear Icon > Library Settings
- Next, click on Permissions for this document library
- As you can see from the message displayed, by default, Site Pages inherit permissions from the parent (Site). That’s why by default, all regular team members can edit all pages.
- To break inheritance, click on Stop Inheriting Permissions. If the warning pop-up appears, click OK
- Click the checkbox next to Members Group, then click on Edit User Permissions
- Finally, uncheck the checkbox next to Edit and check it next to Read. Click OK
- We are all set!
Option 2: Prevent editing of a specific page
Option 1 is easy but might not be a wise decision. That’s because when you don’t allow users to edit pages, they can no longer create or edit a wiki or add an announcement (in modern pages, every announcement is a new page – as part of News web part). So a smart thing here to do would be to prevent editing say the homepage if that is what you care most about, but not of all the other pages.
Here are the instructions on how to prevent editing of a particular page. They differ a bit depending on whether your site still uses classical pages or modern ones.
Classical pages only
- On the classical SharePoint page, click Page Tab > Page Permissions
- You will notice a familiar interface, as with Site Pages library above, except this, applies to just this 1 page. Just follow Steps 6-8 from above, and you will be golden!
Classical or modern pages
There is another way to restrict access, and you can employ it for both wiki (classical) and modern site pages.
- Navigate to the Site Pages library using steps from above (Gear Icon > Site Contents, then click on Site Pages library)
- Click the check box next to the page you want to restrict from editing, then click on little “i” in a circle, then Manage access
- Click the drop-down next to Members Group, then change Edit to View Only
- That’s all, honey! You may now sleep well.
How to restore Pages
If the inevitable happened, and some shmuck from your team inadvertently modified the pages before you discovered this blog post, no worries. Thanks to Version History, we can easily restore the old version. Versioning on Pages works just like with the regular documents. This is how you do it:
- Navigate to the Site Pages library (you should know how to do this by now)
- Right click on the page you want to restore and click Version History
- You will see all the changes made to the page
- Click the drop-down next to the version you want to restore and click Restore
- If the warning pop-up appears, click OK
- Your page should be restored (another version created)
- Mazel Tov! Hope I just saved you hours of rework and swearing at your colleague.