This commit is contained in:
2020-06-10 23:51:25 +00:00
parent 571f11236e
commit 746f60af15
14 changed files with 29 additions and 26 deletions

View File

@@ -9,22 +9,22 @@ using AyaNova.Models;
namespace AyaNova.Biz
{
//Prime the database with initial, minimum required data to boot and do things (manager account, translations)
//Prime the database with initial, minimum required data to boot and do things (SuperUser account, translations)
public static class PrimeData
{
/// <summary>
/// Prime the database with manager account
/// Prime the database with SuperUser account
/// </summary>
public static async Task PrimeManagerAccount(AyContext ct)
public static async Task PrimeSuperUserAccount(AyContext ct)
{
//get a db and logger
//ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("PrimeData");
User u = new User();
u.Active = true;
u.Name = "AyaNova Administrator";
u.Name = "AyaNova SuperUser";
u.Salt = Hasher.GenerateSalt();
u.Login = "manager";
u.Login = "superuser";
u.Password = Hasher.hash(u.Salt, "l3tm3in");
u.Roles = AuthorizationRoles.All;//AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull;