Tuesday, January 27, 2015

Hide Ribbon in SharePoint 2013

You might have thought to show Ribbon to administrator and hide it from other users due to security reason.

 In SharePoint 2013 , we can not modify the master page directly, we need to modify the concern html page.

Every master page in 2013 would have it concerned html page eg for Seattle.master we have Seattle.html
for oslo.master we have oslo.html page.

1. Open the html page in SharePointDesigner 2013.
2. Look for <div id=”ms-designer-ribbon”>
3. Add the following markup enclosed in the <!--MS:--> and <!--ME:—> tags,
<!--MS:<SharePoint:SPSecurityTrimmedControl runat="server" PermissionsString="FullMask">-->
<div id=”ms-designer-ribbon”>
the design manager will create the corresponding master page with the correct functionality of showing the Ribbon for only administrators.

You can check different permissions level HERE.