Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title      = AppUtils.PageTitle;
            lblAppName.Text = AppUtils.AppName;
            submenu.FindItem("LOGIN").Text = ActiveUser.IsAuthenticated ? "LOG OUT" : "LOG IN";
            if (ActiveUser.IsAuthenticated)
            {
                var activeAudit = Audit.GetUserActiveAudit(new ActiveUser().UserName);
                if (activeAudit != null)
                {
                    submenu.FindItem("AUDIT").NavigateUrl = Pages.PerformAudit;
                }
            }
            var settingsButton = submenu.FindItem("SETTINGS");

            if (settingsButton != null && !(ActiveUser.IsInRole(AppRoles.AuditorAdmin) || ActiveUser.IsInRole(AppRoles.UserAdmin)))
            {
                submenu.Items.Remove(settingsButton);
            }
            MenuSelecting(submenu.Items);
        }