protected void getRights() { _sections.Clear(); _Categories.Clear(); _pages.Clear(); RAFSecurity _securityManager = new RAFSecurity(); List <object> _data = _securityManager.searchForUsers(Page.User.Identity.Name, 5); if (_data.Count != 0) { _sections = _securityManager.getUserRights((int)_data[0] + "", "Section"); _Categories = _securityManager.getUserRights((int)_data[0] + "", "Category"); _pages = _securityManager.getUserRights((int)_data[0] + "", "Page"); } }
protected void Page_Load(object sender, EventArgs e) { RAFSecurity _securityManager = new RAFSecurity(); List <object> _dat = _securityManager.searchForUsers(Page.User.Identity.Name, 5); if (_dat.Count != 0) { if (!(_securityManager.getUserRights((int)_dat[0] + "", "Page").Contains("PageRolModifications"))) { Response.Redirect("/default.aspx"); } } if (!IsPostBack) { if (Request.QueryString["RolId"] != null) { RolId.Value = Request.QueryString["RolId"]; _securityManager = new RAFSecurity(); List <object> _data = _securityManager.searchForGroups(RolId.Value.ToString(), 2); if (_data != null) { TBRolName.Text = (String)_data[1]; TXBDescription.Text = (String)_data[2]; if ((Boolean)_data[3]) { RaBuHabilitar.SelectedIndex = 0; } else { RaBuHabilitar.SelectedIndex = 1; } } } } }
protected void Page_Load(object sender, EventArgs e) { //Permisos para esta página RAFSecurity _securityManager = new RAFSecurity(); List <object> _dat = _securityManager.searchForUsers(Page.User.Identity.Name, 5); if (_dat.Count != 0) { if (!(_securityManager.getUserRights((int)_dat[0] + "", "Page").Contains("PageUserModifications"))) { Response.Redirect("/default.aspx"); } } if (!IsPostBack) { if (Request.QueryString["ui"] != null) { UserId.Value = Request.QueryString["ui"]; _securityManager = new RAFSecurity(); List <object> _data = _securityManager.searchForUsers(UserId.Value.ToString(), 4); if (_data != null) { if (_data[1].ToString() != null && _data[1].ToString() != "") { TBUserName.Text = (String)_data[1]; } if (_data[2].ToString() != null && _data[2].ToString() != "") { nameT.Text = (String)_data[2]; } if (_data[3].ToString() != null && _data[3].ToString() != "") { TBSecondName.Text = (String)_data[3]; } if (_data[4].ToString() != null && _data[4].ToString() != "") { TBLastName1.Text = (String)_data[4]; } if (_data[5].ToString() != null && _data[5].ToString() != "") { TBLastName2.Text = (String)_data[5]; } if ((String)_data[6] == "E") { RaBuHabilitar.SelectedIndex = 0; } else { RaBuHabilitar.SelectedIndex = 1; } } } } }
protected void Page_Load(object sender, EventArgs e) { RAFSecurity _securityManager = new RAFSecurity(); List <object> _data = _securityManager.searchForUsers(Page.User.Identity.Name, 5); if (_data.Count != 0) { if (!(_securityManager.getUserRights((int)_data[0] + "", "Section").Contains("SecCustomerSearch"))) { Response.Redirect("/default.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { RAFSecurity _securityManager = new RAFSecurity(); List <object> _data = _securityManager.searchForUsers(Page.User.Identity.Name, 5); if (_data.Count != 0) { if (!(_securityManager.getUserRights((int)_data[0] + "", "Page").Contains("PageCustomerInfo"))) { Response.Redirect("/default.aspx"); } } if (!IsPostBack) { if (Request.QueryString["cu"] != null) { custIDHid.Value = Request.QueryString["cu"]; } } }