Ribbon image

I'm trying to make the Ribbon such that only authorized admin (permissions set in the site permissions feature) can use the Ribbon controls (Browse, Edit, Page). How do I prevent unauthorized users from using the ribbon? I'm currently using SharePoint 2013. Is the solution to this issue under site settings? Or maybe I have to use javascript? Please help me thanks.

2 Answers 2


You could use SPSecurityTrimmedControl for this.

<!—MS:<SharePoint:SpSecurityTrimmedControl runat="server" permission="permission needed to access">—>
the content you want to hide

Some sample threads for your reference.




  • This solution works to a certain extent. It does disable the ribbon but causes my UI's scrollbar to be gone, and I can't scroll down the page. Is there any alternatives to display:block? I tried display:none it doesn't work either.
    – Denise
    Commented Dec 20, 2017 at 8:02
  • Without the css, the scrollbar is still non-existent
    – Denise
    Commented Dec 20, 2017 at 8:25

Is the solution to this issue under site settings?

Unfortunately, No.

Or maybe I have to use javascript?

No need to use JS, just follow the below steps to hide the ribbon from the non-admin users


  • Open SharePoint Designer.
  • Open your site > From left side Click on Master Pages.
  • In SharePoint 2013 There are two related files for Master Page (HTML, Master)
  • Right Click on your custom Master Page with HTML extension > Check Out.

  • Again, Right Click on Master Page with HTML extension > Edit File Advanced Mode.

  • Search for DIV with ID “ms-designer-ribbon“

  • Surround it with this tag SharePoint:SPSecurityTrimmedControl to looks the following

<!--MS:<SharePoint:SPSecurityTrimmedControl runat="server"  
< div id="ms-designer-ribbon" >
 <!--SID:02 {شريط}-->
 <!--PS:  -->

<!--PE:  -->
  • 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.
  • Save the changes > Check In > Publish Master Page as a major version.

Check the detail steps at How to hide the SharePoint 2013 ribbon


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.