2

I know that this has been discussed on serverfault before:

https://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!

3 Answers 3

1

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

0

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.

3
  • ASP.NET doesn't allow web parts in masterpages. The feature you describe could easily be done with a WebControl.
    – James Love
    Commented Sep 21, 2010 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
    Commented Sep 21, 2010 at 12:01
  • Thanks James. I'm new to Sharepoint Development. I'll definitely look into WebControls.
    – Anonymous
    Commented Sep 21, 2010 at 13:44
0

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.

1
  • 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
    Commented Sep 21, 2010 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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