/// <summary> /// Function checks whether the user is authenticated and authorized. /// </summary> /// Revision History /// Anuradha Created 26/05/08 /// <param name="objUserDet>MeterHistoryProperty</param> /// <returns>boolean</returns> public bool ValidateUser(SecurityProperty objUserDetails) { // SecurityProperty objUserDetails = (SecurityProperty)objUserDet; if (objUserDetails.UserName.ToUpper() != "BALLY") { objUserDetails.Password = Encode(objUserDetails.Password, "geoffrey" + objUserDetails.UserName); objUserDt = SecurityDBBuilder.UserDetails(objUserDetails).Tables[0]; return(Authenticate(objUserDt)); } else if (objUserDetails.UserName.ToUpper() == "BALLY") { clsSuperUserPassword objSuperUser = new clsSuperUserPassword(); string strPass = objSuperUser.CreateSuperUserPassword(); if (objUserDetails.Password == strPass) { strUserRole = "administrator"; return(true); } else { return(false); } } else { return(false); } }
/// <summary> /// Function checks whether the user is authenticated and authorized. /// </summary> /// Revision History /// Anuradha Created 26/05/08 /// <param name="objUserDet>MeterHistoryProperty</param> /// <returns>boolean</returns> public bool ValidateUser(SecurityProperty objUserDetails) { // SecurityProperty objUserDetails = (SecurityProperty)objUserDet; if (objUserDetails.UserName.ToUpper() != "BALLY") { objUserDetails.Password = Encode(objUserDetails.Password, "geoffrey" + objUserDetails.UserName); objUserDt = SecurityDBBuilder.UserDetails(objUserDetails).Tables[0]; return Authenticate(objUserDt); } else if (objUserDetails.UserName.ToUpper() == "BALLY") { clsSuperUserPassword objSuperUser = new clsSuperUserPassword(); string strPass = objSuperUser.CreateSuperUserPassword(); if (objUserDetails.Password == strPass) { strUserRole = "administrator"; return true; } else { return false; } } else { return false; } }