Sharepoint - Hide Site Content for Visitors

You have two possibilities in this case that doesn't require code.

Variant 1) Change the permission level of visitor When you change the permission level from "Read" to "Restricted Read" your user won't see the site contents anymore

Variant 2) Alternate read permission level of visitors You can simply remove the base permission "View Application Pages" from the "Read" Permission level.

The "site contents" is not the only place where user will see this navigation option. It is also available through the gear icon on the suite bar. By changing the permissions or permission level it will be hidden from there too.


You'd have to remove it from 2 places, the Quick Launch and the Site Actions menu. You can use JQuery and SPServices to check group membership and hide the link in the Quick Launch. Put the code in your master page(s), not a Content Editor Web Part, to hide it on the entire site. You can also use JQuery to hide "View All Site Content" from the Site Actions menu.

However, you will not be able to prevent users from typing /_layouts/viewlsts.aspx directly into the address bar. Clicking the default "Lists" or "Libraries" headers in the Quick Launch would also take them to the content page. It might be possible to add JQuery to the system master page to redirect visitors to a different page if the URL includes /_layouts/viewlsts.aspx.

Tags:

Permissions