Solved

Sharepoint 2010 - How to dide Edit Icon SPRibbon

Posted on 2010-11-29
5
1,492 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now