Sharepoint 2010 - Hiding 'Site Permissions' on the Site Actions toolbar for an entire site collection

Good morning,

I have been tasked with creating a feature that will allow a customer to hide the 'Site Permissions' menu option on the Site Actions toolbar.

I was thinking this could be done easly with a site scoped feature with a feature.xml as follows

Image

and a manifest file like this

Image

I think what I have listed is an incorrect HideActionID but I am not finding the correct ID listed anywhere in the documentation.

The other two custom actions that are in the manifest work perfectly and hide 'delete web' in site settings and add a new item to the site actions toolbar.

Can you point me to the correct HideActionId for site permissions or tell me where to look.

February 23rd, 2015 9:39pm

Or you could simply remove the "Manage Permissions" permission from the people who shouldn't see the link.  It will security trim automatically.  And even if you remove it from the site actions menu anyone with "manage Permissions" will still be able to reach the same page using the Site Settings link.
Free Windows Admin Tool Kit Click here and download it now
February 23rd, 2015 9:43pm

I will agree with Paul, but just in case if you dont change approach, below client side code may help.

<script type="text/javascript">
 var doc = document.getElementsByTagName('ie:menuitem'); 
 for (var i = 0; i < doc.length; i++){
    itm = doc[i];
    if (itm.id.match('MenuItem_SitePermissions') != null){
        itm.hidden=true;
        break; 
      }
  } 
</script>
jQuery:
$('ie\\:menuitem[id*=MenuItem_SitePermissions]').attr("hidden","true")
Link: SharePoint 2010 Menu IDs

February 23rd, 2015 9:54pm

Sudip I like what you are doing here and it works if embeded in a page in the PlaceHolderMain ContentPlaceHolder.

Pardon if this is a silly question but is there a way to embed this in the master.page?

If so where would I place it?

I know very little about altering master pages so I am sorry if this seems a silly question.


Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 10:09am

Paul,

I want them to be able to alter permissions but I want them to use our custome user manager to do it and not the built in permissions editor

February 27th, 2015 11:19am

If your custom user manager uses a service account to make the actual permissions change then you can still remove the manage Permissions permission.  If not then I would suggest you enforce use of your tool through training and management because you won't be able to remove all the differnt ways that users can get to the assign permissions page.  
Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 1:00pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics