Home >

Hiding SharePoint 2013 Ribbon from Anonymous Users

13. December 2012

While the new design manager in SharePoint 2013 is nice, it is taking me some time to familiarize myself with how to do things that I knew how to do in 2010, but is now a bit different in 2013.  For one thing, I'm used to working with master pages directly, not with just the HTML used to format the page.  When the design manager functionality logically splits the master page "goo" from the HTML, it leaves behind commented out tags that start with <!--MS:--> and <!--ME:--> that show in the HTML.  Markup inside these tags is in some cases what you would find in the final master page.  In other cases it is a bit different.

So when I started trying to figure out how to hide the ribbon from anonymous users as I've done in the past, it was a bit perplexing to sort out where in the HTML file does the markup corresponds to the ribbon.

After some searching in the out-of-the-box oslo.html file, I found this area: 


When I added the following markup enclosed in the <!--MS:--> and <!--ME:--> tags, the design manager created the corresponding master page with the correct functionality of hiding the Ribbon for an anonymous user:



Comments (4) -

1/8/2013 3:06:13 AM #
hi can you please share how and where did you find the oslo.html file on sharepoint 2013 server ? and what did you added to hide the ribbon in hide the ribbon from anonymous users.
Thanks in advance Smile
1/8/2013 9:26:08 PM #
You must map a drive to the http://<host>/_catalogs/masterpage in windows explorer and then once it is mapped, you can edit the file directly from the mapped directory.  When you save your changes, SharePoint automatically updates the corresponding .master file with your changes.  Regarding your second question, if you look closely at the second image above, there is a tag I've highlighted in yellow, namely <SharePoint:SPSecurityTrimmedControl>.  This tag, with the "AddAndCustomizePages" permission must wrap any markup you want to have hidden when someone does not have this permission.
4/5/2013 9:42:57 AM #
Dont work for me....
4/12/2013 8:06:36 AM #
Hi Ariel, what seems to be the issue? Do you have anonymous access turned on in the web application?  Have you given anonymous users rights to view the application?