protected void Page_Load(object sender, EventArgs e) { CoreLibrary.Security.RoleController roleController = new CoreLibrary.Security.RoleController(); if ((HttpContext.Current.Session["CurrentUser"] == null) || (!HttpContext.Current.User.IsInRole(roleController.GetRoleCodeByURL(Request.AppRelativeCurrentExecutionFilePath)))) FormsAuthentication.RedirectToLoginPage(); //((Label)(this.Parent.FindControl("lblTitlePageMaster"))).Text = "Bienvenido"; //if (HttpContext.Current.User.IsInRole("Global_Admin")) }
protected void Page_Load(object sender, EventArgs e) { User entCurrenUser = (User)Session["currentUser"]; if (entCurrenUser != null) { lblUserCompleteName.Text = entCurrenUser.UserCompleteName; Menu.Visible = true; CoreLibrary.Security.RoleController roleController = new CoreLibrary.Security.RoleController(); if (!HttpContext.Current.User.IsInRole(roleController.GetRoleCodeByURL("~/MB/Configuration/Default.aspx"))) mnConfigPage.Visible = false; } else { lblUserCompleteName.Text = ""; Menu.Visible = false; } //FormsAuthentication.RedirectToLoginPage(); lblFecha.Text = String.Format("Hoy es {0:D}", DateTime.Now); }
protected void Page_Load(object sender, EventArgs e) { CoreLibrary.Security.RoleController roleController = new CoreLibrary.Security.RoleController(); if ((HttpContext.Current.Session["CurrentUser"] == null) || (!HttpContext.Current.User.IsInRole(roleController.GetRoleCodeByURL(Request.AppRelativeCurrentExecutionFilePath)))) FormsAuthentication.RedirectToLoginPage(); }