protected void GetCurrentUserRole() { try { objclsBALUsers = new clsBALUsers(); role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); if (role != null) { if (role.Contains <string>(clsEALRoles.GlobalApprover) && role.Contains <string>(clsEALRoles.ControlOwner)) { pnlRole.Visible = true; rdCO.Visible = true; rdGA.Visible = true; btnGo.Visible = true; lblRole.Visible = true; } } Session[clsEALSession.UserRole] = role; } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { LogHelper.LogError(ex); } }
protected void GetCurrentUserRole() { objclsBALUsers = new clsBALUsers(); if (Session["RoleSelected"] == null) { role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); Session[clsEALSession.UserRole] = role; if (role != null) { if (role.Contains <string>(clsEALRoles.Approver)) { lblAnnounce.Text = "CART is an automated tool to assist in the compliance account access review process."; } } } else { role = objclsBALUsers.ApproverOrCO(objclsEALLoggedInUser); Session[clsEALSession.UserRole] = role; if (role != null) { Session["RoleSelected"] = role; Session["UserRole"] = role; } } }
protected void GetCurrentUserRole() { objclsBALUsers = new clsBALUsers(); role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); if (!role.Contains <string>(clsEALRoles.ComplianceAdmin)) { Response.Redirect("Home.aspx"); } }
protected void GetCurrentUserRole() { objclsBALUsers = new clsBALUsers(); if (Session["RoleSelected"] != null) { role = (string[])Session["RoleSelected"]; } else { role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); } if (!role.Contains <string>(clsEALRoles.ComplianceAdmin)) { Response.Redirect("Home.aspx"); } }
private bool CheckUserRoles(clsEALUser objclsEALUser) { objclsBALUsers = new clsBALUsers(); string[] userRole = null; userRole = objclsBALUsers.GetCurrentUserRole(objclsEALUser); //Session[clsEALSession.UserRole] = userRole; bool flag = true; //string strRole = ""; //for(int i=0;i<userRole.Length ;i++) //{ // strRole = userRole[i]; //} if (userRole != null) { if (!userRole.Contains <string>(clsEALRoles.ComplianceAdmin) && !userRole.Contains <string>(clsEALRoles.ComplianceAuditor) && !userRole.Contains <string>(clsEALRoles.ComplianceTester) && !userRole.Contains <string>(clsEALRoles.GlobalApprover)) { if (!userRole.Contains <string>(clsEALRoles.ControlOwner) && !userRole.Contains <string>(clsEALRoles.Approver)) { flag = false;//can assign role } else { flag = true;//cant assign role lblError.Text = "User is either Approver or Control Owner for some applications."; } } else { flag = true;//cant assign role lblError.Text = "User has already been assigned a role."; } } else { flag = false;//can assign role } return(flag); }
protected void GetCurrentUserRole() { try { objclsBALUsers = new clsBALUsers(); if (Session["RoleSelected"] != null) { role = (string[])Session["RoleSelected"]; } else { role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); } for (int i = 0; i < role.Length; i++) { strRole = strRole + role[i]; } Session[clsEALSession.UserRole] = strRole; if (role.Contains <string>(clsEALRoles.ComplianceAuditor) || role.Contains <string>(clsEALRoles.ControlOwner) || role.Contains <string>(clsEALRoles.GlobalApprover) || role.Contains <string>(clsEALRoles.Approver)) { gvApplications.Columns[4].Visible = false; } } catch (NullReferenceException) { Response.Redirect("wfrmErrorPage.aspx", true); } catch (Exception ex) { // LogHelper.LogError(ex); HttpContext Context = HttpContext.Current; LogException objLogException = new LogException(); objLogException.LogErrorInDataBase(ex, Context); Response.Redirect("wfrmErrorPage.aspx", true); } }
protected void GetCurrentUserRole() { objclsBALUsers = new clsBALUsers(); role = objclsBALUsers.GetCurrentUserRole(objclsEALLoggedInUser); Session[clsEALSession.UserRole] = role; }