I applied a custom master page,I need to hide the SharePoint 2013 ribbon based on user permission, I need Html Code same as

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb"> <div id="s4-ribbonrow" …</div> </SharePoint:SPSecurityTrimmedControl>

  • Edit your custom Master Page (HTML File)>

  • To hide the ribbon for all user

< div id="ms-designer-ribbon" style="display: none !important;" >
  • To hide the ribbon based on the PermissionString
<!--MS:<SharePoint:SPSecurityTrimmedControl runat="server"  
Put the whole DIV of **ms-designer-ribbon**

To be like

enter image description here

In PermissionsString attribute, you can add any permission type based on your requirement from the following:

  • FullMask.
  • EmptyMask.
  • ManagePermissions.
  • ManageSubwebs.
  • ManageWeb.
  • AddAndCustomizePages.
  • BrowseDirectories.
  • ViewPages.
  • EnumeratePermissions.
  • ManageAlerts.

Check the detail steps at

  • Great Its working,but I can't scroll down the page?@Qassas – Debugger Sep 8 '16 at 11:50
  • Is the scroll bar disabled or not exist ? – Mohamed El-Qassas MVP Sep 8 '16 at 12:29
  • Scroll is not exist@Qassas – Debugger Sep 8 '16 at 12:47
  • Should you tell me what's the type of master page , Oslo , settle , v4 ... custom master page , also are you tried diff browser – Mohamed El-Qassas MVP Sep 8 '16 at 12:52
  • anyway find this s4-workspace at your master page if exist try to add this style , #s4-workspace { overflow-y: scroll; } – Mohamed El-Qassas MVP Sep 8 '16 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.