More in this section

Forums / Developing with Sitefinity / Blocking out pages that have permissions

Blocking out pages that have permissions

1 posts, 0 answered
  1. Charles
    Charles avatar
    61 posts
    Registered:
    18 Jul 2012
    25 Jul 2012
    Link to this post
    I have a scenario where I'm making pages not public. If you try opening the pages (when logged out) the pages are not served. Great.
    I have the following code that gets the pages but I'm not sure how to determine if the user viewing the node has permission. I've applied permissions to pages so I'd like to determine how to not display a node if the user does not have permission

     

     

    try

     

    {

     

     

    RadPanelItem item = e.Item;

     

     

     

    PageSiteNode dataItem = (PageSiteNode)e.Item.DataItem;

     

     

     

    if (!dataItem.ShowInNavigation)

     

    {

     

     

    if (item.Level > 0)

     

    {

     

     

    RadPanelItem pi = (RadPanelItem)item.Parent;

     

    pi.Items.Remove(item);

    }

     

     

    else

     

    {

     

     

    this.PanelBar.Items.Remove(item);

     

    }

     

     

    return;

     

    }

1 posts, 0 answered