This commit is contained in:
@@ -23,10 +23,10 @@ namespace AyaNova.Biz
|
||||
{
|
||||
switch (aytype)
|
||||
{
|
||||
case AyaType.User:
|
||||
case AyaType.User:
|
||||
return new UserBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID, roles);
|
||||
case AyaType.Widget:
|
||||
return new WidgetBiz(dbcontext, userId, roles);
|
||||
return new WidgetBiz(dbcontext, userId, ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID, roles);
|
||||
case AyaType.Tag:
|
||||
return new TagBiz(dbcontext, userId, roles);
|
||||
case AyaType.TagMap:
|
||||
@@ -37,7 +37,7 @@ namespace AyaNova.Biz
|
||||
return new ImportAyaNova7Biz(dbcontext, userId, roles);
|
||||
case AyaType.TrialSeeder:
|
||||
return new TrialBiz(dbcontext, userId, roles);
|
||||
case AyaType.Locale:
|
||||
case AyaType.Locale:
|
||||
return new LocaleBiz(dbcontext, userId, roles);
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,9 @@ namespace AyaNova.Biz
|
||||
//do stuff with User
|
||||
User outObj = inObj;
|
||||
outObj.OwnerId = UserId;
|
||||
outObj.UserOptions = new UserOptions(UserId);
|
||||
//Seeder sets user options in advance so no need to create them here in that case
|
||||
if(outObj.UserOptions==null)
|
||||
outObj.UserOptions = new UserOptions(UserId);
|
||||
|
||||
await ct.User.AddAsync(outObj);
|
||||
//save to get Id
|
||||
@@ -75,11 +77,11 @@ namespace AyaNova.Biz
|
||||
|
||||
//Handle child and associated items
|
||||
|
||||
//Associated user options object
|
||||
UserOptions options = new UserOptions(UserId);
|
||||
options.User = outObj;
|
||||
ct.UserOptions.Add(options);
|
||||
await ct.SaveChangesAsync();
|
||||
// //Associated user options object
|
||||
// UserOptions options = new UserOptions(UserId);
|
||||
// options.User = outObj;
|
||||
// ct.UserOptions.Add(options);
|
||||
// await ct.SaveChangesAsync();
|
||||
|
||||
//Log event
|
||||
EventLogProcessor.AddEntry(new Event(UserId, outObj.Id, BizType, AyaEvent.Created), ct);
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace AyaNova.Util
|
||||
u.OwnerId = 1;
|
||||
var p = new Bogus.Person();
|
||||
u.Name = p.FullName;
|
||||
u.Salt = Hasher.GenerateSalt();
|
||||
// u.Salt = Hasher.GenerateSalt();
|
||||
if (login != null)
|
||||
{
|
||||
u.Login = login;
|
||||
@@ -241,10 +241,11 @@ namespace AyaNova.Util
|
||||
}
|
||||
else
|
||||
u.Login = p.FirstName;
|
||||
|
||||
if (password != null)
|
||||
u.Password = Hasher.hash(u.Salt, password);
|
||||
u.Password = password;//u.Password = Hasher.hash(u.Salt, password);
|
||||
else
|
||||
u.Password = Hasher.hash(u.Salt, u.Login);
|
||||
u.Password = u.Login;//u.Password = Hasher.hash(u.Salt, u.Login);
|
||||
u.Roles = roles;
|
||||
u.LocaleId = ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
|
||||
u.UserType = userType;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace raven_integration
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Auth", null, creds.ToString());
|
||||
//Put this in when having concurrency issue during auth and old style dl token creation during login
|
||||
//ValidateDataReturnResponseOk(a);
|
||||
ValidateDataReturnResponseOk(a);
|
||||
|
||||
authDict[login] = a.ObjectResponse["result"]["token"].Value<string>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user