protected void Page_Load(object sender, EventArgs e)
    {
        CurrentUserInfo cu = CMSContext.CurrentUser;

        // Check permissions
        if ((cu == null) || !cu.IsAuthorizedPerResource("CMS.Ecommerce", "EcommerceRead"))
        {
            CMSMyDeskPage.RedirectToCMSDeskAccessDenied("CMS.Ecommerce", "EcommerceRead");
        }

        // Check UIProfile
        if (!cu.IsAuthorizedPerUIElement("CMS.Desk", "Ecommerce"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.Desk", "Ecommerce");
        }

        if (!cu.IsAuthorizedPerUIElement("CMS.Ecommerce", "DashboardGroup"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "DashboardGroup");
        }

        if (!cu.IsAuthorizedPerUIElement("CMS.Ecommerce", "EcommerceDashboard"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.Ecommerce", "EcommerceDashboard");
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Check UIProfile
        if ((CMSContext.CurrentUser == null) || (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.MyDesk", "MyDeskDashBoard")))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.MyDesk", "MyDeskDashBoard");
        }

        if (!CMSContext.CurrentUser.IsAuthorizedPerUIElement("CMS.MyDesk", "MyDeskDashBoardItem"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.MyDesk", "MyDeskDashBoardItem");
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Keep current user
        CurrentUserInfo cu = CMSContext.CurrentUser;

        // Check permissions
        if ((CMSContext.CurrentUser == null) || !cu.IsAuthorizedPerResource("CMS.WebAnalytics", "Read"))
        {
            CMSMyDeskPage.RedirectToCMSDeskAccessDenied("CMS.WebAnalytics", "Read");
        }

        // Check ui elements
        if (!cu.IsAuthorizedPerUIElement("CMS.WebAnalytics", "Dashboard"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.WebAnalytics", "Dashboard");
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CurrentUserInfo cu = CMSContext.CurrentUser;

        // Check permissions
        if ((cu == null) || !cu.IsAuthorizedPerResource("CMS.OnlineMarketing", "Read"))
        {
            CMSMyDeskPage.RedirectToCMSDeskAccessDenied("CMS.OnlineMarketing", "Read");
        }

        // Check UIProfile
        if (!cu.IsAuthorizedPerUIElement("CMS.OnlineMarketing", "OMDashBoardGroup"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.OnlineMarketing", "OMDashBoardGroup");
        }

        if (!cu.IsAuthorizedPerUIElement("CMS.OnlineMarketing", "OMDashBoard"))
        {
            CMSMyDeskPage.RedirectToCMSDeskUIElementAccessDenied("CMS.OnlineMarketing", "OMDashBoard");
        }

        // Register script for unimenu button selection
        CMSDeskPage.AddMenuButtonSelectScript(this, "OMDashBoard", null, "menu");
    }