This commit is contained in:
2020-01-24 20:47:57 +00:00
parent 008ea40649
commit e18e75b972
2 changed files with 7 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ namespace AyaNova.Biz
{
ct = dbcontext;
UserId = currentUserId;
UserLocaleId = userLocaleId;
CurrentUserRoles = userRoles;
BizType = AyaType.User;
SeedOrImportRelaxedRulesMode = false;//default

View File

@@ -507,8 +507,12 @@ namespace AyaNova.Util
public static void GenSeedUser(ILogger log, int count, AuthorizationRoles roles, UserType userType, decimal timeZoneOffset, bool active = true, string login = null, string password = null, long localeId = 0)
public static void GenSeedUser(ILogger log, int count, AuthorizationRoles roles, UserType userType, decimal timeZoneOffset,
bool active = true, string login = null, string password = null, long localeId = 0)
{
if (localeId == 0)
localeId = ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
using (var cct = ServiceProviderProvider.DBContext)
{
UserBiz Biz = UserBiz.GetBizInternal(cct);
@@ -538,7 +542,7 @@ namespace AyaNova.Util
else
u.Password = u.Login;
u.Roles = roles;
u.LocaleId = localeId == 0 ? ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID : localeId;
u.LocaleId = localeId;
u.UserType = userType;
u.EmployeeNumber = "A-" + (454 + SeededUserCount).ToString() + "-Y";
u.Notes = Fake.Lorem.Sentence();//Fake.Lorem.Paragraph(2);