Solved

Sharepoint 2010 - How to dide Edit Icon SPRibbon

Posted on 2010-11-29
5
1,523 Views
Last Modified: 2012-05-10
Dear Expert,
I would like to hide, based on authotization, the edit icon on the SpRibbon of Sharepoint 2010.

Thank you,
Giuseppe

Hide-Icon.JPG
0
Comment
Question by:uniprof
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:robertosljunior
ID: 34232932
You can hide the edit button using SharePoint: SPSecurityTrimmedControl.

0
 

Author Comment

by:uniprof
ID: 34233239
Ok, but how ?
0
 
LVL 9

Expert Comment

by:Justin Imes
ID: 34238868
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";
</script>
</Sharepoint:SPSecurityTrimmedControl>

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.
0
 

Author Comment

by:uniprof
ID: 34239002
But how is possibile there is not any chance to hide edit page button for a specific group of users?
0
 
LVL 9

Accepted Solution

by:
Justin Imes earned 500 total points
ID: 34239389
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

http://spribbonvisibility.codeplex.com/
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question