diff --git a/server/AyaNova/biz/BizObjectFactory.cs b/server/AyaNova/biz/BizObjectFactory.cs index 3c186650..2191117e 100644 --- a/server/AyaNova/biz/BizObjectFactory.cs +++ b/server/AyaNova/biz/BizObjectFactory.cs @@ -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); diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 24b48dbd..c21a802e 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -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); diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index 2ea0fe8f..0c16cb33 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -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; diff --git a/test/raven-integration/util.cs b/test/raven-integration/util.cs index f793ccc5..8717c096 100644 --- a/test/raven-integration/util.cs +++ b/test/raven-integration/util.cs @@ -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(); }