diff --git a/devdocs/todo.txt b/devdocs/todo.txt index c33cd9ea..26d426e7 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -8,6 +8,7 @@ PRIORITY - ALWAYS Lowest level stuff first todo: usertype scheduleable? Or sb Service and nonScheduleble sb NonService and subcontractor sb ServiceContractor? will require some renaming of things but this is more logical and meets intended usage + todo: Pick a consistent single letter lambda expression variable and standardize on it. one of X Y or Z is best as it doesn't trigger intellisense todo: OPS routes (SERVER AND CLIENT) diff --git a/server/AyaNova/Controllers/EnumListController.cs b/server/AyaNova/Controllers/EnumListController.cs index 07e5c50a..bdbc7f72 100644 --- a/server/AyaNova/Controllers/EnumListController.cs +++ b/server/AyaNova/Controllers/EnumListController.cs @@ -131,22 +131,22 @@ namespace AyaNova.Api.Controllers } else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(UserType).ToString()).ToLowerInvariant()) { - TranslationKeysToFetch.Add("UserTypesAdministrator"); - TranslationKeysToFetch.Add("UserTypesSchedulable"); - TranslationKeysToFetch.Add("UserTypesNonSchedulable"); - TranslationKeysToFetch.Add("UserTypesCustomer"); - TranslationKeysToFetch.Add("UserTypesHeadOffice"); + TranslationKeysToFetch.Add("UserTypeAdministrator"); + TranslationKeysToFetch.Add("UserTypeService"); + TranslationKeysToFetch.Add("UserTypeNotService"); + TranslationKeysToFetch.Add("UserTypeCustomer"); + TranslationKeysToFetch.Add("UserTypeHeadOffice"); TranslationKeysToFetch.Add("UserTypesSubContractor"); - TranslationKeysToFetch.Add("UserTypesUtility"); + TranslationKeysToFetch.Add("UserTypeUtility"); var LT = TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, TranslationId).Result; - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesAdministrator"], Id = (long)UserType.Administrator }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesSchedulable"], Id = (long)UserType.Schedulable }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesNonSchedulable"], Id = (long)UserType.NonSchedulable }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesCustomer"], Id = (long)UserType.Customer }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesHeadOffice"], Id = (long)UserType.HeadOffice }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesUtility"], Id = (long)UserType.Utility }); - ReturnList.Add(new NameIdItem() { Name = LT["UserTypesSubContractor"], Id = (long)UserType.Subcontractor }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeAdministrator"], Id = (long)UserType.Administrator }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeService"], Id = (long)UserType.Service }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeNotService"], Id = (long)UserType.NotService }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeCustomer"], Id = (long)UserType.Customer }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeHeadOffice"], Id = (long)UserType.HeadOffice }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypeUtility"], Id = (long)UserType.Utility }); + ReturnList.Add(new NameIdItem() { Name = LT["UserTypesSubContractor"], Id = (long)UserType.ServiceContractor }); } else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()).ToLowerInvariant()) { diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 7ba64f00..4945f11c 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -33,8 +33,8 @@ namespace AyaNova.Biz { var ct = ServiceProviderProvider.DBContext; var ret = await ct.User.Where(x => x.Active == true && ( - x.UserType == UserType.Schedulable || - x.UserType == UserType.Subcontractor)).LongCountAsync(); + x.UserType == UserType.Service || + x.UserType == UserType.ServiceContractor)).LongCountAsync(); return ret; } @@ -466,7 +466,7 @@ namespace AyaNova.Biz } //Validate headoffice type user - if (!SeedOrImportRelaxedRulesMode && proposedObj.UserType == UserType.Subcontractor) + if (!SeedOrImportRelaxedRulesMode && proposedObj.UserType == UserType.ServiceContractor) { if (proposedObj.SubVendorId == null || proposedObj.SubVendorId == 0) { diff --git a/server/AyaNova/biz/UserType.cs b/server/AyaNova/biz/UserType.cs index 24e113cc..13a79f0c 100644 --- a/server/AyaNova/biz/UserType.cs +++ b/server/AyaNova/biz/UserType.cs @@ -1,72 +1,16 @@ namespace AyaNova.Biz { - /// - /// All AyaNova user types + /// AyaNova User types /// public enum UserType : int { Administrator = 1, - Schedulable = 2, - NonSchedulable = 3, + Service = 2, + NotService = 3, Customer = 4, HeadOffice = 5, Utility = 6, - Subcontractor = 7 + ServiceContractor = 7 } - - }//eons - -/* - -/////////////////////////////////////////////////////////// -// UserTypes.cs -// Implementation of Class UserTypes -// CSLA type: enumeration -// Created on: 07-Jun-2004 8:41:44 AM -// Object design: Joyce -/////////////////////////////////////////////////////////// - -using System.ComponentModel; - - -namespace GZTW.AyaNova.BLL { - /// - /// Variations of types - /// - public enum UserTypes : int { - /// - /// This is the special account used only for updates, for customizing layout, etc - /// - [Description("LT:UserTypes.Label.Administrator")] Administrator = 1, - /// - /// This is a user that can be assigned to a workorder or schedule and consumes an AyaNova license - /// - [Description("LT:UserTypes.Label.Schedulable")] Schedulable = 2, - /// - /// Standard user that can use all aspects of AyaNova but can not be chosen to assign to a work order or schedule - /// Does not consume an AyaNova license - /// - [Description("LT:UserTypes.Label.NonSchedulable")] NonSchedulable = 3, - /// - /// Client's login user account for WBI - /// - [Description("LT:UserTypes.Label.Client")] Client = 4, - /// - /// HeadOffice's login user account for WBI - /// - [Description("LT:UserTypes.Label.HeadOffice")] HeadOffice = 5, -/// -/// Utility user type for internal processing with limited functionality -/// ATTN. API users: Do not create or set a user to this type in your code, you will be dissapointed and will break things. :) -/// - [Description("UTILITY")] Utility = 6 - //*** IF MORE ADDED USER OBJECT USERTYPE PROPERTIES - // BROKEN RULES MUST BE UPDATED AND SQL SERVER USER TABLE CHECK CONSTRAINT - // FOR USERTYPE VALUE *** - - }//end UserTypes - -}//end namespace GZTW.AyaNova.BLL - */ diff --git a/server/AyaNova/models/User.cs b/server/AyaNova/models/User.cs index c2dff4cb..c8658e73 100644 --- a/server/AyaNova/models/User.cs +++ b/server/AyaNova/models/User.cs @@ -83,7 +83,7 @@ namespace AyaNova.Models { get { - return this.UserType == UserType.Subcontractor || this.UserType == UserType.Schedulable; + return this.UserType == UserType.ServiceContractor || this.UserType == UserType.Service; } } diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index ff537d32..a8379013 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -1212,12 +1212,12 @@ "UserSkillDescription": "Beschreibung", "UserSkillList": "Benutzerfähigkeiten", "UserSkillName": "Benutzerfähigkeit - Name", - "UserTypesAdministrator": "Administrator", - "UserTypesCustomer": "Benutzer beim Kunden", - "UserTypesHeadOffice": "Benutzer am Hauptsitz des Kunden", - "UserTypesNonSchedulable": "Nicht planbarer Benutzer", - "UserTypesSchedulable": "Planbarer Benutzer", - "UserTypesUtility": "Dienstprogrammkonto", + "UserTypeAdministrator": "Administrator", + "UserTypeCustomer": "Benutzer beim Kunden", + "UserTypeHeadOffice": "Benutzer am Hauptsitz des Kunden", + "UserTypeNotService": "Nicht planbarer Benutzer", + "UserTypeService": "Planbarer Benutzer", + "UserTypeUtility": "Dienstprogrammkonto", "VendorAccountNumber": "Kontonummer", "VendorContact": "Contact", "VendorContactNotes": "Other contacts", diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 318ab9d5..445feb6c 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -1212,12 +1212,12 @@ "UserSkillDescription": "Description", "UserSkillList": "User Skills", "UserSkillName": "User Skill Name", - "UserTypesAdministrator": "Administrator user", - "UserTypesCustomer": "Customer user", - "UserTypesHeadOffice": "Head office user", - "UserTypesNonSchedulable": "Non-schedulable user", - "UserTypesSchedulable": "Schedulable user", - "UserTypesUtility": "Utility account", + "UserTypeAdministrator": "Administrator user", + "UserTypeCustomer": "Customer user", + "UserTypeHeadOffice": "Head office user", + "UserTypeNotService": "Non-schedulable user", + "UserTypeService": "Schedulable user", + "UserTypeUtility": "Utility account", "VendorAccountNumber": "Account Number", "VendorContact": "Contact", "VendorContactNotes": "Other contacts", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index 658c6051..b0cb4e6c 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -1212,12 +1212,12 @@ "UserSkillDescription": "Descripción", "UserSkillList": "Habilidades del usuario", "UserSkillName": "Nombre habilidad de usuario", - "UserTypesAdministrator": "Usuario administrador", - "UserTypesCustomer": "Usuario cliente", - "UserTypesHeadOffice": "Usuario cliente de sede", - "UserTypesNonSchedulable": "Usuario no programable", - "UserTypesSchedulable": "Usuario programable", - "UserTypesUtility": "Cuenta de utilidad", + "UserTypeAdministrator": "Usuario administrador", + "UserTypeCustomer": "Usuario cliente", + "UserTypeHeadOffice": "Usuario cliente de sede", + "UserTypeNotService": "Usuario no programable", + "UserTypeService": "Usuario programable", + "UserTypeUtility": "Cuenta de utilidad", "VendorAccountNumber": "Número de cuenta", "VendorContact": "Contact", "VendorContactNotes": "Other contacts", diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index 5bcbe92b..2fa05192 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -1212,12 +1212,12 @@ "UserSkillDescription": "Description", "UserSkillList": "Aptitudes d'utilisateur", "UserSkillName": "Nom d'aptitude d'utilisateur", - "UserTypesAdministrator": "Utilisateur administrateur", - "UserTypesCustomer": "Utilisateur client", - "UserTypesHeadOffice": "Utilisateur client de siège social", - "UserTypesNonSchedulable": "Utilisateur non programmable", - "UserTypesSchedulable": "Utilisateur programmable", - "UserTypesUtility": "Compte utilitaire", + "UserTypeAdministrator": "Utilisateur administrateur", + "UserTypeCustomer": "Utilisateur client", + "UserTypeHeadOffice": "Utilisateur client de siège social", + "UserTypeNotService": "Utilisateur non programmable", + "UserTypeService": "Utilisateur programmable", + "UserTypeUtility": "Compte utilitaire", "VendorAccountNumber": "Numéro de compte", "VendorContact": "Contact", "VendorContactNotes": "Other contacts", diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index b56edbce..8630d11d 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -208,10 +208,10 @@ namespace AyaNova.Util var watch = new Stopwatch(); watch.Start(); //Generate owner and lead tech - await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.OpsAdminFull, UserType.Schedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.OpsAdminFull, UserType.Service); //Generate one office person / secretary - await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.AccountingFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.AccountingFull, UserType.NotService); //PERF watch.Stop(); await LogStatusAsync(JobId, LogJob, log, $"{SeededUserCount} Users seeded in {watch.ElapsedMilliseconds} ms"); @@ -238,34 +238,34 @@ namespace AyaNova.Util var watch = new Stopwatch(); watch.Start(); //One IT administrator, can change ops but nothing else - await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NotService); //One business administrator, can view ops issues - await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); //One owner who doesn't control anything but views stuff - await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.SalesLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.SalesLimited, UserType.NotService); //20 techs - await GenSeedUserAsync(log, 20, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Schedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); //2 subcontractors - await GenSeedUserAsync(log, 2, AuthorizationRoles.SubContractorFull, UserType.Subcontractor); + await GenSeedUserAsync(log, 2, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); //3 generic office people people - await GenSeedUserAsync(log, 3, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 3, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); //2 Full sales people - await GenSeedUserAsync(log, 2, AuthorizationRoles.SalesFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 2, AuthorizationRoles.SalesFull, UserType.NotService); //1 dispatch manager - await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); //1 Inventory manager - await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); //1 accountant / bookkeeper - await GenSeedUserAsync(log, 1, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 1, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); //10 full on customer users await GenSeedUserAsync(log, 10, AuthorizationRoles.CustomerLimited, UserType.Customer); @@ -302,46 +302,46 @@ namespace AyaNova.Util watch.Start(); //IT administrator, can change ops but nothing else - await GenSeedUserAsync(log, 2, AuthorizationRoles.OpsAdminFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 2, AuthorizationRoles.OpsAdminFull, UserType.NotService); //business administrator, can view ops issues - await GenSeedUserAsync(log, 2, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 2, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); //owner / upper management who doesn't control anything but views stuff - await GenSeedUserAsync(log, 5, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NotService); //100 techs - await GenSeedUserAsync(log, 100, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Schedulable); + await GenSeedUserAsync(log, 100, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); //limited techs - await GenSeedUserAsync(log, 50, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Schedulable); + await GenSeedUserAsync(log, 50, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Service); //20 subcontractors - await GenSeedUserAsync(log, 20, AuthorizationRoles.SubContractorFull, UserType.Subcontractor); + await GenSeedUserAsync(log, 20, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); //10 limited subcontractors - await GenSeedUserAsync(log, 10, AuthorizationRoles.SubContractorLimited, UserType.Subcontractor); + await GenSeedUserAsync(log, 10, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor); //30 generic office people people - await GenSeedUserAsync(log, 30, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 30, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); //10 Full sales people - await GenSeedUserAsync(log, 10, AuthorizationRoles.SalesFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 10, AuthorizationRoles.SalesFull, UserType.NotService); //5 Limited sales people - await GenSeedUserAsync(log, 5, AuthorizationRoles.SalesLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.SalesLimited, UserType.NotService); //5 dispatch manager - await GenSeedUserAsync(log, 5, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); //5 Inventory manager - await GenSeedUserAsync(log, 5, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); //10 Inventory manager assistants - await GenSeedUserAsync(log, 5, AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.InventoryLimited, UserType.NotService); //5 accountant / bookkeeper - await GenSeedUserAsync(log, 5, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 5, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); //100 full on customer users await GenSeedUserAsync(log, 20, AuthorizationRoles.CustomerFull, UserType.Customer); @@ -379,46 +379,46 @@ namespace AyaNova.Util watch.Start(); //IT administrator, can change ops but nothing else - await GenSeedUserAsync(log, 10, AuthorizationRoles.OpsAdminFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 10, AuthorizationRoles.OpsAdminFull, UserType.NotService); //business administrator, can view ops issues - await GenSeedUserAsync(log, 10, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 10, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); //owner / upper management who doesn't control anything but views stuff - await GenSeedUserAsync(log, 20, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NotService); //regular techs - await GenSeedUserAsync(log, 500, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Schedulable); + await GenSeedUserAsync(log, 500, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); //limited techs - await GenSeedUserAsync(log, 200, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Schedulable); + await GenSeedUserAsync(log, 200, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Service); //subcontractors - await GenSeedUserAsync(log, 80, AuthorizationRoles.SubContractorFull, UserType.Subcontractor); + await GenSeedUserAsync(log, 80, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); //limited subcontractors - await GenSeedUserAsync(log, 40, AuthorizationRoles.SubContractorLimited, UserType.Subcontractor); + await GenSeedUserAsync(log, 40, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor); //generic office people people - await GenSeedUserAsync(log, 200, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 200, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); //20 Full sales people - await GenSeedUserAsync(log, 20, AuthorizationRoles.SalesFull, UserType.NonSchedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.SalesFull, UserType.NotService); //10 Limited sales people - await GenSeedUserAsync(log, 10, AuthorizationRoles.SalesLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 10, AuthorizationRoles.SalesLimited, UserType.NotService); //dispatch manager - await GenSeedUserAsync(log, 20, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); //Inventory manager - await GenSeedUserAsync(log, 40, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 40, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); //Inventory manager assistants - await GenSeedUserAsync(log, 20, AuthorizationRoles.InventoryLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.InventoryLimited, UserType.NotService); //accountant / bookkeeper - await GenSeedUserAsync(log, 20, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NonSchedulable); + await GenSeedUserAsync(log, 20, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); //full on customer users await GenSeedUserAsync(log, 200, AuthorizationRoles.CustomerFull, UserType.Customer); @@ -499,32 +499,32 @@ namespace AyaNova.Util KnownUserTags.Add("test-role-user"); //TEST USERS //one of each role type - await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited, UserType.NonSchedulable, "BizAdminLimited", "BizAdminLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull, UserType.NonSchedulable, "BizAdminFull", "BizAdminFull", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchLimited, UserType.NonSchedulable, "DispatchLimited", "DispatchLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull, UserType.NonSchedulable, "DispatchFull", "DispatchFull", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryLimited, UserType.NonSchedulable, "InventoryLimited", "InventoryLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryFull, UserType.NonSchedulable, "InventoryFull", "InventoryFull", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.AccountingFull, UserType.NonSchedulable, "Accounting", "Accounting", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.TechLimited, UserType.Schedulable, "TechLimited", "TechLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.TechFull, UserType.Schedulable, "TechFull", "TechFull", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.SalesLimited, UserType.NonSchedulable, "SalesLimited", "SalesLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.SalesFull, UserType.NonSchedulable, "SalesFull", "SalesFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited, UserType.NotService, "BizAdminLimited", "BizAdminLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull, UserType.NotService, "BizAdminFull", "BizAdminFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchLimited, UserType.NotService, "DispatchLimited", "DispatchLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.DispatchFull, UserType.NotService, "DispatchFull", "DispatchFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryLimited, UserType.NotService, "InventoryLimited", "InventoryLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.InventoryFull, UserType.NotService, "InventoryFull", "InventoryFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.AccountingFull, UserType.NotService, "Accounting", "Accounting", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.TechLimited, UserType.Service, "TechLimited", "TechLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.TechFull, UserType.Service, "TechFull", "TechFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.SalesLimited, UserType.NotService, "SalesLimited", "SalesLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.SalesFull, UserType.NotService, "SalesFull", "SalesFull", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.SubContractorLimited, UserType.Subcontractor, "SubContractorLimited", "SubContractorLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.SubContractorFull, UserType.Subcontractor, "SubContractorFull", "SubContractorFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor, "SubContractorLimited", "SubContractorLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor, "SubContractorFull", "SubContractorFull", KnownUserTags); await GenSeedUserAsync(log, 1, AuthorizationRoles.CustomerLimited, UserType.Customer, "CustomerLimited", "CustomerLimited", KnownUserTags); await GenSeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, "CustomerFull", "CustomerFull", KnownUserTags); await GenSeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.HeadOffice, "HeadOffice", "HeadOffice", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable, "OpsAdminLimited", "OpsAdminLimited", KnownUserTags); - await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NonSchedulable, "OpsAdminFull", "OpsAdminFull", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, "OpsAdminLimited", "OpsAdminLimited", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NotService, "OpsAdminFull", "OpsAdminFull", KnownUserTags); //PRIVACY TEST USER - this is used for a test to see if user info leaks into the logs - await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable, "TEST_PRIVACY_USER_ACCOUNT", "TEST_PRIVACY_USER_ACCOUNT", KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, "TEST_PRIVACY_USER_ACCOUNT", "TEST_PRIVACY_USER_ACCOUNT", KnownUserTags); //TEST NOT ACTIVE - this is used for a test to see if inactive user can login - await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NonSchedulable, false, "TEST_INACTIVE", "TEST_INACTIVE", 0, KnownUserTags); + await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, false, "TEST_INACTIVE", "TEST_INACTIVE", 0, KnownUserTags); //Alternate translation users for each stock translation await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.Administrator, true, "de", "de", await TranslationBiz.TranslationNameToIdStaticAsync("de"), KnownUserTags);