Solved

Sharepoint 2010 - How to dide Edit Icon SPRibbon

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
A question that is asked often, is how to generate sequential numbers in InfoPath Forms. The best way to achieve this is to use a SQL database, along with a stored procedure and a web service to connect Forms Services to the DB. The first thing t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

777 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