This commit is contained in:
2018-09-05 23:05:43 +00:00
parent cd52c3e83f
commit 0a3c927429
6 changed files with 37 additions and 24 deletions

View File

@@ -199,7 +199,7 @@ namespace AyaNova.Util
//PRIVACY TEST USER - this is used for a test to see if user info leaks into the logs
GenSeedUser(1, AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable, "TEST_PRIVACY_USER_ACCOUNT", "TEST_PRIVACY_USER_ACCOUNT");
//TEST NOT ACTIVE - this is used for a test to see if inactive user can login
//TEST NOT ACTIVE - this is used for a test to see if inactive user can login
GenSeedUser(1, AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable, false, "TEST_INACTIVE", "TEST_INACTIVE");
}
@@ -254,6 +254,10 @@ namespace AyaNova.Util
u.UserType = userType;
//TODO: After have USER and HEADOFFICE and VENDOR, if usertype is subcontractor or client or headoffice it needs to set a corresponding user's parent org record id to go with it
//Children and relations
u.UserOptions = new UserOptions(1);
u.UserOptions.EmailAddress = p.Email.Replace("gmail.com","helloayanova.com").Replace("hotmail.com","helloayanova.com").Replace("yahoo.com","helloayanova.com");
ct.User.Add(u);
}
//save to get id values
@@ -271,9 +275,7 @@ namespace AyaNova.Util
//Now we have all the id's can actually add them to the context
foreach (long l in ItemsAdded)
{
EventLogProcessor.AddEntry(new Event(1, l, AyaType.User, AyaEvent.Created), ct);
UserOptions UO=new UserOptions(l,1);
ct.UserOptions.Add(UO);
EventLogProcessor.AddEntry(new Event(1, l, AyaType.User, AyaEvent.Created), ct);
}
//Now save the Event Log entries