Hide SpRibbon sharepoint 2010 for different user permissions

                Some times you may want to hide the SharePoint ribbon for some users who is having lower permissions.For that You need to do some modifications on master page.See the following steps
 We can  hide it from everyone except the users who have Full Control.

Step 1:


  • Open your master page and find <div id="s4-ribbonrow" tag
  • Then you need to add a new tag, which will hold the above tag.See the following code
<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
<div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
   <!-- Ribbon code appears here... -->
 </div>
</SharePoint:SPSecurityTrimmedControl>


  • Here PermissionsString="ManagePermissions" is a permission level which you need to add in SharePoint site and then give the permission levels to groups
  • So people who are all having this ManagePermissions can view the Ribbon.

Step 2:

To add this permission level
 Just go to site settings-->site permission -->click on "permission level"-->click add permission level-->now select manage permission. Now you can assign same permission to your user or group.

Then finally save your master page and do check in and check out. That's it you have done!Now the people who have ManagePermissions can view the Ribbon

Note:
This SPSecurityTrimmedControl will not work for Full control(ie. full control users can view the Top ribbon even they dont have ManagePermissions )
If you want to make the Ribbon only visible to the Full control users then add PermissionsString="FullMask"

For more details see the following
Link1 ,
Link2
Link3
See this link for wsp solution file for this problem

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error