This commit is contained in:
@@ -25,6 +25,7 @@ namespace AyaNova.Biz
|
|||||||
{
|
{
|
||||||
ct = dbcontext;
|
ct = dbcontext;
|
||||||
UserId = currentUserId;
|
UserId = currentUserId;
|
||||||
|
UserLocaleId = userLocaleId;
|
||||||
CurrentUserRoles = userRoles;
|
CurrentUserRoles = userRoles;
|
||||||
BizType = AyaType.User;
|
BizType = AyaType.User;
|
||||||
SeedOrImportRelaxedRulesMode = false;//default
|
SeedOrImportRelaxedRulesMode = false;//default
|
||||||
|
|||||||
@@ -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)
|
using (var cct = ServiceProviderProvider.DBContext)
|
||||||
{
|
{
|
||||||
UserBiz Biz = UserBiz.GetBizInternal(cct);
|
UserBiz Biz = UserBiz.GetBizInternal(cct);
|
||||||
@@ -538,7 +542,7 @@ namespace AyaNova.Util
|
|||||||
else
|
else
|
||||||
u.Password = u.Login;
|
u.Password = u.Login;
|
||||||
u.Roles = roles;
|
u.Roles = roles;
|
||||||
u.LocaleId = localeId == 0 ? ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID : localeId;
|
u.LocaleId = localeId;
|
||||||
u.UserType = userType;
|
u.UserType = userType;
|
||||||
u.EmployeeNumber = "A-" + (454 + SeededUserCount).ToString() + "-Y";
|
u.EmployeeNumber = "A-" + (454 + SeededUserCount).ToString() + "-Y";
|
||||||
u.Notes = Fake.Lorem.Sentence();//Fake.Lorem.Paragraph(2);
|
u.Notes = Fake.Lorem.Sentence();//Fake.Lorem.Paragraph(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user