CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

Security Trim "View All Site Content"

Posted by Clayton James on July 28, 2009

I have been asked this a few times. How can I remove the View All Site Content link for certain users?

The View All Site Content link can be a great navigational link or a problematic link that confuses end users.
image

The default security setting for this SPLinkButton is set to be displayed to everyone…and when I say everyone I mean everyone…viewers and even anonymous users. This is found in the master page in your site.

  1. Open up the master page in SharePoint designer
  2. Place the page into split view
  3. Click the View All Site Content link and in you code window you should see the following

<Sharepoint:SPSecurityTrimmedControl runat=”server” PermissionsString=”ViewFormPages”>
        <div class=”ms-quicklaunchheader”><SharePoint:SPLinkButton id=”idNavLinkViewAll” runat=”server” NavigateUrl=”~site/_layouts/viewlsts.aspx” Text=”<%$Resources:wss,quiklnch_allcontent%>” AccessKey=”<%$Resources:wss,quiklnch_allcontent_AK%>”/></div>
</SharePoint:SPSecurityTrimmedControl>

 

Thankfully we can easily upgrade the security to different security level. For example, if we change the PermissionsString=”ManageWeb” then only users who have this permission level (site admins) will see the View All Site Content link.

<Sharepoint:SPSecurityTrimmedControl runat=”server” PermissionsString=”ManageWeb”>
        <div class=”ms-quicklaunchheader”><SharePoint:SPLinkButton id=”idNavLinkViewAll” runat=”server” NavigateUrl=”~site/_layouts/viewlsts.aspx” Text=”<%$Resources:wss,quiklnch_allcontent%>” AccessKey=”<%$Resources:wss,quiklnch_allcontent_AK%>”/></div>
</SharePoint:SPSecurityTrimmedControl>

 

There are a number of different permission levels that you can view here.

The SharePoint:SecurityTrimmedControl is a handy control that can be used in many locations. For example, wrap it around the Site Actions control for custom and you remove this control based on security.

About these ads

11 Responses to “Security Trim "View All Site Content"”

  1. [...] Security Trim "View All Site Content". [...]

  2. [...] Security Trim "View All Site Content". [...]

  3. Michele said

    I cannot understand what I have to change in the code to hide the “View all Site Content” for standard users (I’d like to be visibile only to site admins)
    Can you give me some more details?
    Thanks & regards
    Michele

  4. Donna said

    Works like a charm! Thank you, thank you, thank you!

  5. Guy said

    That always worked for me, however there is a security hole. How do you limit access to that period? This removes the link, but someone stumbling onto a sharepoint site could still manually type in the url (and not that difficult to find out) or you’ve any libraries on the quicklink or tree then from there you can click the view drop down box and still get to view all site.

    Question is how do we limit it completely?

  6. Francois Coeries said

    Great article! Thanks Mr James.

  7. Sally said

    I am curious to find out what blog platform
    you have been utilizing? I’m experiencing some minor security problems with my latest blog and I’d like to find something more safe.
    Do you have any suggestions?

  8. Hey there! This is my first visit to your blog!
    We are a collection of volunteers and starting a new initiative in a community in the
    same niche. Your blog provided us useful information to work on.
    You have done a extraordinary job!

  9. Just put your cooking pans and frying pans into the proper
    section of you dishwashing machineand let the burst
    of water rinse them so powerfully without any traces of mess and oil left.
    When you’re making an expensive purchase online, it’s nice to know that the company will stand behind its product.
    Kitchen – Aid Assortment Hoods have types for the purpose of
    the island or peninsula owners, and also these variations are incredibly inspirational.

  10. Hi every one, here every person is sharing these kinds of knowledge,
    thus it’s pleasant to read this weblog, and I used to pay
    a quick visit this website everyday.

  11. Hello to every one, because I am truly eager of reading this web site’s post to be updated regularly.
    It contains fastidious material.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: