Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can I remove this ribbon: enter image description here

for specific users which has only read permissions?

share|improve this question
1  
Why would you remove it? –  Plexus81 Aug 13 at 8:08
    
Because I'm required to, also it some users don't need this at all. –  user3529236 Aug 13 at 8:15

1 Answer 1

Use JS library SPServices from codeplex to get current user permissions: http://spservices.codeplex.com/wikipage?title=GetRolesAndPermissionsForCurrentUser

And then just hide the menu item with JS. The hardest part is to obtain the permissions, which can be done smoothly with SPServices.

You can add this JS to edited master page, or develop custom control, maybe just add web part to specific pages, where you want to hide the ribbon.

To avoid "flashing" of the ribbon maybe hide it first by CSS for everyone and then just display for the persons with specific permissions.

share|improve this answer
3  
Keep in mind that this approach only hides it client side, so if you need to hide it for security reasons, this is not secure enough. But for just "cleaning" the GUI from unnecessary objects, this works great –  Robert Lindgren Aug 13 at 8:19
    
There is no security issue because all the controls inside the ribbon are handled by default. So only "security" reason I can think of is they do not want users to know the path to the site/list. –  luccio Aug 13 at 10:38
    
Well security is a wide term, not wanting users to access certain paths is surely included in the term. Also, since this bar is customizable, there could be other security concerns –  Robert Lindgren Aug 13 at 10:48
    
@luccio That's assuming permissions are properly set. If not, hiding the ribbon via client side code is merely security by obfuscation, which may be what Robert is getting at. –  wjervis Aug 13 at 12:32
    
I agree with you, this approach should not be selected to handle security. However, my guess is, that he just wants to hide these tabs for the users who will not use it anyway (read permissions). –  luccio Aug 13 at 14:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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