New attribute added to the 'ModulesData.config' 'selectedUserContext' through

this attribute the left menu (UserAccountMenu) can be managed based on the
selected user. The logged on user context (roles) finally determines if the
menu item shows up or not.

selectedUserContext attribute can contain "Administrator,Reseller,User"
This commit is contained in:
robvde 2012-07-30 17:02:06 +04:00
parent 268245d920
commit 089a62ce72
3 changed files with 33 additions and 11 deletions

View file

@ -290,6 +290,9 @@ namespace WebsitePanel.WebPortal
else
page.Roles.AddRange(xmlPage.Attributes["roles"].Value.Split(ROLES_DELIMITERS.ToCharArray()));
if (xmlPage.Attributes["selectedUserContext"] != null)
page.Roles.AddRange(xmlPage.Attributes["selectedUserContext"].Value.Split(ROLES_DELIMITERS.ToCharArray()));
page.Enabled = (xmlPage.Attributes["enabled"] != null) ? Boolean.Parse(xmlPage.Attributes["enabled"].Value) : true;
page.Hidden = (xmlPage.Attributes["hidden"] != null) ? Boolean.Parse(xmlPage.Attributes["hidden"].Value) : false;
page.SkinSrc = (xmlPage.Attributes["skin"] != null) ? xmlPage.Attributes["skin"].Value : null;