This commit is contained in:
2022-12-27 01:06:14 +00:00
parent c5d1350b6b
commit bf6554e568
4 changed files with 47 additions and 11 deletions

View File

@@ -21,12 +21,12 @@ namespace Sockeye.Biz
//ILogger log = Sockeye.Util.ApplicationLogging.CreateLogger("PrimeData");
User u = new User();
u.Active = true;
u.AllowLogin=true;
u.AllowLogin = true;
u.Name = "Sockeye SuperUser";
u.Salt = Hasher.GenerateSalt();
u.Login = "ss";
u.Password = Hasher.hash(u.Salt, "ss");
u.Roles = AuthorizationRoles.Accounting | AuthorizationRoles.BizAdmin | AuthorizationRoles.Inventory | AuthorizationRoles.OpsAdmin | AuthorizationRoles.Sales | AuthorizationRoles.Service ;
u.Roles = AuthorizationRoles.Accounting | AuthorizationRoles.BizAdmin | AuthorizationRoles.Inventory | AuthorizationRoles.OpsAdmin | AuthorizationRoles.Sales | AuthorizationRoles.Service;
u.UserType = UserType.NotService;
@@ -37,6 +37,19 @@ namespace Sockeye.Biz
}
/// <summary>
/// Prime the database with SuperUser account
/// </summary>
public static async Task PrimeVendor(AyContext ct)
{
Vendor u = new Vendor();
u.Active = true;
u.Name = "MyCommerce";
await ct.Vendor.AddAsync(u);
await ct.SaveChangesAsync();
}
// //used during development so I don't need to keep installing licenses over and over
@@ -98,7 +111,7 @@ namespace Sockeye.Biz
Translation l = new Translation();
l.Name = translationCode;
l.BaseLanguage=translationCode;
l.BaseLanguage = translationCode;
l.Stock = true;
l.CjkIndex = false;