• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1567
  • Last Modified:

Sharepoint 2010 - How to dide Edit Icon SPRibbon

Dear Expert,
I would like to hide, based on authotization, the edit icon on the SpRibbon of Sharepoint 2010.

Thank you,

  • 2
  • 2
1 Solution
You can hide the edit button using SharePoint: SPSecurityTrimmedControl.

uniprofAuthor Commented:
Ok, but how ?
Justin ImesFull Time SharePoint JediCommented:
Check out my blog at http://findjut.blogspot.com/ I have a section in their with code explaining how to hide the ribbon controls:
Here is the BLOG POST

Tried a few techniques this one suits me best...

Set the in-line style for both the id="s4-statusbarcontainer" and id="s4-ribbonrow" div's to style="display:none". Then somewhere appropriate below both elements in the master page insert the following:

<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl" runat="server" PermissionsString="AddAndCustomizePages">
<script type="text/javascript">
document.getElementById("s4-statusbarcontainer").style.display = "block";
document.getElementById("s4-ribbonrow").style.display = "block";

This will cause the ribbon and status notification to be rendered by the browser yet be hidden so the page will still operate normally. If the user is authenticated and allow to modify pages it will render the JavaScript to override the hidden style.
uniprofAuthor Commented:
But how is possibile there is not any chance to hide edit page button for a specific group of users?
Justin ImesFull Time SharePoint JediCommented:
Here you may want to look into this codeplex add on.  this should solve your issue.

My code above is to hide the ribbon from antonymous users... not specific user groups

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now