In this post, we will discuss how we can hide ribbon from anonymous users in SharePoint 2013. If your site is accessible by anonymous users then we can hide the ribbon from anonymous users by doing the following customization.
– Add an app page showing loading SharePoint 2013
Here we need to modify the master page, so first take a backup of the master page or you can create a new master page from the existing master page and can modify on that.
Here we are going to modify in the Seattle.master page
, so I have taken a backup of the master page.
Now open your SharePoint designer, click on Master Pages from left side Site Objects. It will open the master page list. Select the particular master page Right click Check out, then Right click and click on Edit File in Advanced Mode.
Then in the master page search for <div id=”s4-ribbonrow”>
Modify that line withe style=”Display:none” attribute which should look like below:
<div id=”s4-ribbonrow” style=”display:none”>
Then go to the end tag. You can put mouse cursor in the above line then right click and click on “Select Tag”. This will select the whole tag. And below to the end tag write the below stuff:
<SharePoint:SPSecurityTrimmedControl ID=”HideRibbonRow” runat=”server” PermissionsString=”ManageWeb”>
document.getElementById(“s4-ribbonrow”).style.display = “block”;
Now Save the master page and login with anonymous user, the ribbon will not appear.
Hope this will be helpful.
-: FREE PDF e-Book Download :-
51 JSOM Examples in SharePoint Online
You May Also like the Following SharePoint Online Tutorials: