I have a site setup which has a common shared root site. But the subsites (site collections on a managed path) aren't for all users.

I want the main site's top navigation bar to show the main site and the subsites to which the user actually has access. I see a few options here:

  • Create a seperate list / table in which I store which sites a particular user has access to, query it for the current user and show the sites.
  • Somehow dynamically list the sites to which the current user has access. I haven't yet found a way to do this.
  • Other options I might have missed?

Who knows of a good way to do this? It's a Foundation installation by the way.

2 Answers 2


As far as I know, OOTB SharePoint navigation system is security trimmed so if user doesn't have access to the location, navigation should hide the link to that user. But if you added navigation nodes manually, you have use custom code to apply security to such a nodes. Please see details here: article

  • Hello Ivan, that's true but I'll have 250+ site collections. Adding them all to site nav is fine, but for instance the admin user will have access to all sites which will mess up navigation. So for the admin user I'd rather not show any of the subsite at all.
    – Jasper
    Commented May 20, 2011 at 6:32
  • ok, then wrap whole navigation in SecurityTrimmedControl, and show your site collection to the end users only :) Commented May 20, 2011 at 20:39

I solved it differently. Since every user is only linked to a single customer site, I stored the customer id at user level in the user information list. In my masterpage, I added an ondatabound event to the menu which retrieves the linked customer in codebehind and adds a navigation item to the default sharepoint navigation options.

Requires a bit more custom work, but works great.

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.