0

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>

3

1 Answer 1

1
  • 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"  
PermissionsString="FullMask">-->
Put the whole DIV of **ms-designer-ribbon**
<!--ME:</SharePoint:SPSecurityTrimmedControl>-->

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

7
  • Great Its working,but I can't scroll down the page?@Qassas
    – Debugger
    Commented Sep 8, 2016 at 11:50
  • Is the scroll bar disabled or not exist ? Commented Sep 8, 2016 at 12:29
  • Scroll is not exist@Qassas
    – Debugger
    Commented Sep 8, 2016 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 Commented Sep 8, 2016 at 12:52
  • anyway find this s4-workspace at your master page if exist try to add this style , #s4-workspace { overflow-y: scroll; } Commented Sep 8, 2016 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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