Skip Ribbon Commands
Skip to main content

ComputerBlog

:

ComputerBlog > Posts > HIDING VIEW ALL SITE CONTENT AND RECYCLE BIN IN SHAREPOINT 2010
 

Posts

 
พฤษภาคม 30
HIDING VIEW ALL SITE CONTENT AND RECYCLE BIN IN SHAREPOINT 2010

Open up the desired site in SharePoint Designer and look in your Master Pages.  Locate your desired master page (mine is v4, like most others).  Many sites say not to alter the master page itself, but to make a copy.  You can do that…..or revert to a previous version if you make a mistake.  Open the file, then click Edit File.

Look for the following element in the code:

<SharePoint:UIVersionedContent UIVersion="4" runat="server" id="PlaceHolderQuickLaunchBottomV4">
<ContentTemplate>
<ul class="s4-specialNavLinkList">

Above the bold section, add the following line of code:
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManagePermissions">

Change the blue PermissionsString value to whatever you want.  Multiple permissions can be separated with a comma (no spaces).  Note it should be a permission your target user(s) do not have, and has to come from this list.  Spelling and case-sensitivity is important.  Finally, add the closing tag after the SharePoint:UIVersionedContent closing tag:
</SharePoint:UIVersionedContent>
</Sharepoint:SPSecurityTrimmedControl>

Save your changes and test the results.  Those with the correct permissions should be able to see the Recycle Bin and View All Site Content elements in the quick launch area at the bottom, everyone else should not.

Note: This WILL NOT remove View All Site Content from the drop down menu under Site Actions.  To remove View All Site Content from the Site Actions drop down, in the same master page, go up towards the top and look for the following element:
<SharePoint:SPRibbonPeripheralContent
runat="server"
Location="TabRowLeft"
CssClass="ms-siteactionscontainer s4-notdlg">

Start scrolling through the MenuItemTemplate elements underneath this one, and look for the one with the id of “MenuItem_ViewAllSiteContents”.

<SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents"
Text="<%$Resources:wss,quiklnch_allcontent%>"
Description="<%$Resources:wss,siteactions_allcontentdescription%>"
ImageUrl="/_layouts/images/allcontent32.png"
MenuGroupId="300"
Sequence="302"
UseShortId="true"
ClientOnClickNavigateUrl="~site/_layouts/viewlsts.aspx"
PermissionsString="ManagePermissions"
PermissionMode="Any" />

Notice the attribute I highlighted in blue? Change the value to be whatever you set it to in the previous code segment above and save your changes.​

Comments

There are no comments for this post.