Solved

Sharepoint 2010 - How to dide Edit Icon SPRibbon

Posted on 2010-11-29
5
1,537 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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