This commit is contained in:
2020-06-18 23:34:27 +00:00
parent 1e9c3a83fb
commit 1e1553773c
12 changed files with 85 additions and 71 deletions

View File

@@ -249,7 +249,7 @@ namespace AyaNova.Biz
catch (Exception ex)
{
log.LogError(ex, "JobsBiz::ProcessJobsAsync unexpected error during processing");
//TODO:OPSNOTIFY
//TODO: notify OPSNOTIFY
}
finally
{

View File

@@ -42,7 +42,7 @@ namespace AyaNova.Biz
}
//Called by license processor when use downgrades to lesser amount of techs
internal static async Task DeActivateExcessiveTechs(long KeepThisManyActiveTechs, ILogger _log)
internal static async Task DeActivateExcessiveTechs(long KeepThisManyActiveTechs, ILogger _log)
{
var TotalActiveTechs = await ActiveCountAsync();
int CountOfTechsToSetInactive = (int)(TotalActiveTechs - KeepThisManyActiveTechs);
@@ -64,6 +64,18 @@ namespace AyaNova.Biz
}
internal static void ResetSuperUserPassword()
{
using (AyContext ct = ServiceProviderProvider.DBContext)
{
User dbObj = ct.User.FirstOrDefault(z => z.Id == 1);
dbObj.Password = Hasher.hash(dbObj.Salt, ServerBootConfig.AYANOVA_SET_SUPERUSER_PW);
ct.SaveChanges();
//TODO: notify OPSNOTIFY
}
}
internal static UserBiz GetBiz(AyContext ct, Microsoft.AspNetCore.Http.HttpContext httpContext = null)
{
if (httpContext != null)