More in this section

Forums / Developing with Sitefinity / Security Trimming of Site Map nodes

Security Trimming of Site Map nodes

4 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    03 Oct 2008
    Link to this post
    Does SItefinity support security trimming of navigation, like SharePoint does?  In other words, if a logged in or anonymous user doesn't have access to certain pages, can they be hidden in the navigation?

    I suppose I can do this node-by-node in the OnItemDatabound event by checking the user's role for the CmsPage, but it seems like there would be a performance hit here so I was wondering if there was a way to do it out of the box.

    Thanks!
    Mike
  2. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    05 Oct 2008
    Link to this post
    Hi Mike,

    I believe the answer to your question is "Yes".  Sitefinity automatically builds an ASP.NET SiteMap from your Sitefinity site structure:

    http://msdn.microsoft.com/en-us/library/system.web.sitemap.aspx

    Most of the main navigation controls Sitefinity comes packaged with appear to utilize this Sitemap.  The SiteMap is filtered according to security settings.  So, if I have the following Site structure:

    [Root]
        - Home
        - Blogs
        - Gallery
        - Contact

    ...and I turn-off anonymous access for the "Gallery" page; this is how the SiteMap will look to an anonymous user:

    [Root]
        - Home
        - Blogs
        - Contact

    Any navigation controls that use the SiteMap will automatically inherit this functionality.  Does this help?

    Gabe Sumner

  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    06 Oct 2008
    Link to this post
    Excellent...I feel foolish; I should have realized that ASP.NET would already do that.

    I don't suppose this extends to search results, though?  If not, I could probably implement a separate index for the secured portion of the site.

    Mike
  4. Joe
    Joe avatar
    138 posts
    Registered:
    24 Sep 2012
    06 Oct 2008
    Link to this post
    Hi Mike,

    Thanks for contacting us.

    You must create a search index and tell it not to index non-public pages. This will ensure that users without access to the page cannot search it. For more info on searching, please read Services in our User Manual. Feel free to contact us if you need further assistance.

    Sincerely yours,
    Joe
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered