How To Hide Ribbon From Users Without Edit Page Privilege

 A way to remove or hide the ribbon area from user with lease privilege, and here is how:
1)      Open your SharePoint master page
2)      Locate this line:<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
3)      Change it to:<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
4)      Now find the end of the “s4-ribbonrow” tag and add following block right after it:<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages">    <script type="text/javascript">        document.getElementById("s4-ribbonrow").style.display = "block";
    </script>
</
Sharepoint:SPSecurityTrimmedControl>
5)      Save the new master page and publish it.
Learn more about SPSecurityTrimmedControl

Comments

Anonymous said…

0
down vote
favorite
I have used the ribbonrowhidetitle" around my ribbon code in my master page, and this hides ribbons on pages as well as on forms, which means my users cant edit now. The reason I needed to hide the ribbon on the pages is I have users who know how to use the "Manage Content" item on the Site Action menu. I am trying to lock down my site. I have used the SPSecurityTrimmedControl2 with PermissionsString=ManageWeb which helps but does not remove the Manage Content option so I went with the above. Anyone know how to only hide the ribbon on the pages but not on the forms?
Anonymous said…

0
down vote
favorite
I have used the ribbonrowhidetitle" around my ribbon code in my master page, and this hides ribbons on pages as well as on forms, which means my users cant edit now. The reason I needed to hide the ribbon on the pages is I have users who know how to use the "Manage Content" item on the Site Action menu. I am trying to lock down my site. I have used the SPSecurityTrimmedControl2 with PermissionsString=ManageWeb which helps but does not remove the Manage Content option so I went with the above. Anyone know how to only hide the ribbon on the pages but not on the forms?

Popular Posts

SharePoint Interview Questions and Answers

Download Infopath Form Templates

How to get current logged user information using JavaScript ?

Steps to set Form based authentication (FBA) for SharePoint 2010

SharePoint Interview Questions and Answers II

Get List Items - JavaScript

Change Language for current user with JSOM in SharePoint Online

Cross Site List Rollup Web Part for SharePoint 2010

Hide Recently Modified Items

SharePoint 2010 CSS Chart