How to restrict permissions for anonymous user, he should only see the content published in pages

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/200519

Pergunta

Hi we have internet public website for anonymous users can view without login, these pages display some reports but still anonymous users can view all site contents and goes to any pages and library of this sites and sub sites.

_layouts/15/viewlsts.aspx Forms/AllItems.aspx?RootFolder=

anonymous user should only see the content published in pages only not go inside of site or subsites How to add anonymous user to group

enter image description here

Foi útil?

Solução

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

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

Example - You can add anonymous users to the Restricted Readers group. Or Create a custom group and assign "Restricted read" permission to it.

enter image description here

2) Alternate read permission level of anonymous users You can simply remove the base permission "View Application Pages" from the "Read" Permission level or create a custom permission level and remove "View Application pages" permission from it by unchecking it as below for anonymous users:

enter image description here

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.

In the masterpage , you try below code in masterpage:

Find the SharePoint:SiteActions tag, inside it you will find

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents",

change PermissionsString="" property to:

"EnumeratePermissions,ManageWeb,ManageSubwebs,AddAndCustomizePages,ApplyThemeAndBorder,ManageAlerts,ManageLists,ViewUsageData"

Reference - Hide site content for visitors

Security trimming publishing site

3) Activate the limited access user permission lockdown mode feature

This feature will block users to view list view pages. Users can able to access all other web pages.

In 2010, we had the FormpagesLockDown feature, however, in 2013 we need to activate this feature "limited access user permission lockdown mode".

enter image description here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top