This commit is contained in:
Andy Howard
2024-11-26 11:33:22 +00:00
parent 8b872cc8f3
commit c8b5df5909
56 changed files with 1122 additions and 860 deletions
@@ -83,7 +83,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUserList")]
public IActionResult Ajax_GetUserList(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUserList";
String messageTitle = Localiser["label.users"];
AjaxResponse_UserList responseData = new AjaxResponse_UserList(model);
@@ -173,7 +172,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUser")]
public IActionResult Ajax_GetUser(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUser";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -214,7 +212,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/GetUserByEmail")]
public IActionResult Ajax_GetUserByEmail(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_GetUserByEmail";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
StoreSessionData = false;
@@ -259,7 +256,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/StoreUser")]
public IActionResult Ajax_StoreUser(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_StoreUser";
String messageTitle = Localiser["label.user"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -357,7 +353,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Account
[Route("Account/UserAccount/Ajax/SendEmails")]
public IActionResult Ajax_SendEmails(Model_UserAccount model)
{
String fn = GetType().Name + ".Ajax_SendEmails";
String messageTitle = Localiser["label.emails"];
AjaxResponse_User responseData = new AjaxResponse_User(model);
@@ -70,7 +70,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/GetOwnerList")]
public IActionResult Ajax_GetOwnerList(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_GetOwnerList";
String messageTitle = Localiser["label.owners"];
AjaxResponse_OwnerList responseData = new AjaxResponse_OwnerList(model);
@@ -157,7 +156,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/GetOwner")]
public IActionResult Ajax_GetOwner(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_GetOwner";
String messageTitle = Localiser["label.owner"];
AjaxResponse_Owner responseData = new AjaxResponse_Owner(model);
@@ -199,7 +197,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Owner/Ajax/StoreOwner")]
public IActionResult Ajax_StoreOwner(Model_Owner model)
{
String fn = GetType().Name + ".Ajax_StoreOwner";
String messageTitle = Localiser["label.owner"];
AjaxResponse_Owner responseData = new AjaxResponse_Owner(model);
@@ -72,7 +72,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/GetRepositoryList")]
public IActionResult Ajax_GetRepositoryList(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_GetRepositoryList";
String messageTitle = Localiser["label.repositories"];
AjaxResponse_RepositoryList responseData = new AjaxResponse_RepositoryList(model);
@@ -156,7 +155,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/GetRepository")]
public IActionResult Ajax_GetRepository(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_GetRepository";
String messageTitle = Localiser["label.repository"];
AjaxResponse_Repository responseData = new AjaxResponse_Repository(model);
@@ -207,7 +205,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers.Instance
[Route("Instance/Repository/Ajax/StoreRepository")]
public IActionResult Ajax_StoreRepository(Model_Repository model)
{
String fn = GetType().Name + ".Ajax_StoreRepository";
String messageTitle = Localiser["label.repository"];
AjaxResponse_Repository responseData = new AjaxResponse_Repository(model);
@@ -56,7 +56,6 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers
[HttpGet, HttpPost]
public IActionResult ChangePassword(Model_Security model)
{
String fn = GetType().Name + ".ChangePassword";
bool validSessionRequired = true;
if (Request.Method.EqualsCI(HttpMethods.Get))
@@ -79,19 +78,19 @@ namespace Sarand.BusinessMgr.Web.Control.Controllers
model.rpe = encryptedParams;
validSessionRequired = false;
}
else SaLogger.Warn(fn + " 'Request Password' parameters supplied but invalid. " + logSuffix);
else SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but invalid. {logSuffix}");
}
else SaLogger.Warn(fn + " 'Request Password' parameters supplied but account is not active. " + logSuffix);
else SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but account is not active. {logSuffix}");
}
else
{
// User Account not found - redirect to Portal application.
String redirectParamName = ParamName_RequestPasswordEncrypted + "2";
SaLogger.Warn(fn + " 'Request Password' parameters supplied but account is not 'Admin'. " + logSuffix);
SaLogger.Warn($"{SysUtil.Fn} 'Request Password' parameters supplied but account is not 'Admin'. {logSuffix}");
if (!Request.Query.Keys.Contains(redirectParamName) && !StringUtil.IsEmpty(AppConfig.URL.Portal.Root))
{
UriBuilder uri = new UriBuilder(Regex.Replace(AppConfig.URL.Portal.Root, "/$", "") + "/Security/ChangePassword");
uri.Query = ParamName_RequestPasswordEncrypted + "=" + Uri.EscapeDataString(encryptedParams) + "&" + redirectParamName;
uri.Query = $"{ParamName_RequestPasswordEncrypted}={Uri.EscapeDataString(encryptedParams)}&{redirectParamName}";
return Redirect(uri.Uri.OriginalString);
}
}