Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I know that this has been discussed on serverfault before:

http://serverfault.com/questions/87390/sharepoint-site-showing-up-even-though-user-has-no-permissions-to-it

Kevin Davis was nice to chime in, but never answered the question.

So without touching the NavNodes table and without using some complicated C# code, how would one be able to either disable or simply not show a navigation item if the user doesn't have the proper permission.

The dynamic navigation is nice, but it's pointless to have an item from the navigation show up if the user doesn't have permission to access the page in the first place. Is there a way to setup permissions on the navigation itself? Or have it be aware that the user cannot view the page that the navigation links to and thus is against common sense to display it?

Any help would be appreciated. The issue I'm currently battling is the 'Parent' site link showing up when visiting a sub/child-site. The user has access to the sub-site but not the parent site, yet the dynamic navigation is showing that link.

Thanks!

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Hello does SpSecurityTrimming not do this very thing and also I thought the navigation was trimmed by default?

I.e. if I dont have permissions to view a list it will not appear in the navbar or quick launch

Thanks Matt

share|improve this answer
add comment

I'm having the same problem with the Quick Launch and it's been driving me crazy.

Right now I have a web part that I've put in the master page that checks what user is looking at the page. Based on that user's permissions to the lists displayed on the Quick Launch navigation it displays/deletes the nodes.

This works for the most part but I think it might cause issues. If one user loads a page on the sharepoint site, the navigation changes for everyone. I'm thinking that once more than 1 or 2 people are using it, the web part won't work so well.

Did you ever find a solution to this problem? Have you tried this solution? I feel like this is something Sharepoint should already do.

share|improve this answer
    
ASP.NET doesn't allow web parts in masterpages. The feature you describe could easily be done with a WebControl. –  James Love Sep 21 '10 at 11:59
    
Apologies, my outdated information led me astray with the details on Web Parts inside Master Pages (I'll have to find out what the current state of that is). Regardless, I would have developed the functionality you described with a WebControl rather than a WebPart. –  James Love Sep 21 '10 at 12:01
    
Thanks James. I'm new to Sharepoint Development. I'll definitely look into WebControls. –  Anonymous Sep 21 '10 at 13:44
add comment

Thanks for the help, guys! I looked into the SPSecurityTrimming and found these blogs:

http://blogs.technet.com/b/chad/archive/2009/12/03/tip-12_3a00_-hide-in-plain-view-with-sharepoint_3a00_spsecuritytrimmedcontrol.aspx http://sympmarc.com/2008/12/31/spsecuritytrimmedcontrol-possible-values-for-permissionsstring/

This was just what I was looking for.

share|improve this answer
    
Spoke too soon. It doesn't trim the navigation based on the permissions to the lists in the navigation, only to the current site permissions. –  Anonymous Sep 21 '10 at 17:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.