Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Access denied when databinding EPiServer MenuList

Vote:
 

Hi!

In EPiServer Admin mode we've created a group containing a single user. The group has read access to the whole page tree but publish rights to just one branch in the tree.

When simply browsing a page, for example 'www.the-site.com/start', everything is ok. However, browsing the same page after having logged in to edit mode (webUI/CMS/edit) leads to an exception:

[AccessDeniedException: Access denied]
   EPiServer.PageBase.GetPage(PageReference pageLink, ILanguageSelector selector) +354
   EPiServer.Web.WebControls.PageTreeData.GetExpandedPages(PageReference pageLink) +138
   EPiServer.Web.WebControls.PageTreeData.get_OpenPages() +227
   EPiServer.Web.WebControls.PageTreeData.get_OpenTopPage() +83
   EPiServer.Web.WebControls.MenuList.CreateChildControls() +367
   EPiServer.Web.WebControls.PageTreeData.DataBind() +256
   Elmia.Web.Site.UserControl.Layout.MainMenu.OnLoad(EventArgs e) in \Web\Site\UserControl\Layout\MainMenu.ascx.cs:25
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

On line 25, pages are bound to an EPiServer MenuList:

Menu.PageLink = MenuHelper.GetMenuRoot(CurrentPage);
Menu.PageLoader.GetChildrenCallback = new HierarchicalPageLoader.GetChildrenMethod(LoadChildren);
Menu.DataBind(); // This is line 25

Anyone have any ideas on what could be wrong?


//Marcus

#65040
Jan 18, 2013 9:06
Vote:
 

Hi,


Clearly the user doesn't has read access to all pages. Does the user has read access to the recycle bin and root?

Try to clear your cookies and login again.

#65046
Jan 18, 2013 11:15
Vote:
 

Thank you Johan!

The problem was resolved by adding read rights to the EPiServer root.

#65060
Jan 18, 2013 13:25
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.