Renamed roles and trans keys "Limited"->"Restricted" "Full" -> ""

This commit is contained in:
2021-07-12 17:19:09 +00:00
parent 798e21671b
commit 56d8cc27cb
60 changed files with 548 additions and 548 deletions

View File

@@ -13,7 +13,7 @@ namespace AyaNova.Api.ControllerHelpers
{ {
/// <summary> /// <summary>
/// User has any role limited or full /// User has any role restricted or full
/// </summary> /// </summary>
/// <param name="HttpContextItems"></param> /// <param name="HttpContextItems"></param>
/// <param name="CheckRoles"></param> /// <param name="CheckRoles"></param>
@@ -25,7 +25,7 @@ namespace AyaNova.Api.ControllerHelpers
} }
/// <summary> /// <summary>
/// User has any role limited or full /// User has any role restricted or full
/// </summary> /// </summary>
/// <param name="currentUserRoles"></param> /// <param name="currentUserRoles"></param>
/// <param name="CheckRoles"></param> /// <param name="CheckRoles"></param>

View File

@@ -294,8 +294,8 @@ namespace AyaNova.Api.Controllers
//If the server is ops only then this user needs to be ops or else they are not allowed in //If the server is ops only then this user needs to be ops or else they are not allowed in
if (serverState.IsOpsOnly && if (serverState.IsOpsOnly &&
!u.Roles.HasFlag(Biz.AuthorizationRoles.OpsAdminFull) && !u.Roles.HasFlag(Biz.AuthorizationRoles.OpsAdmin) &&
!u.Roles.HasFlag(Biz.AuthorizationRoles.OpsAdminLimited)) !u.Roles.HasFlag(Biz.AuthorizationRoles.OpsAdminRestricted))
{ {
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
} }

View File

@@ -330,44 +330,44 @@ namespace AyaNova.Api.Controllers
{ {
// TranslationKeysToFetch.Add("AuthorizationRoleNoRole"); // TranslationKeysToFetch.Add("AuthorizationRoleNoRole");
TranslationKeysToFetch.Add("AuthorizationRoleBizAdminLimited"); TranslationKeysToFetch.Add("AuthorizationRoleBizAdminRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleBizAdminFull"); TranslationKeysToFetch.Add("AuthorizationRoleBizAdmin");
TranslationKeysToFetch.Add("AuthorizationRoleDispatchLimited"); TranslationKeysToFetch.Add("AuthorizationRoleServiceRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleDispatchFull"); TranslationKeysToFetch.Add("AuthorizationRoleService");
TranslationKeysToFetch.Add("AuthorizationRoleInventoryLimited"); TranslationKeysToFetch.Add("AuthorizationRoleInventoryRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleInventoryFull"); TranslationKeysToFetch.Add("AuthorizationRoleInventory");
TranslationKeysToFetch.Add("AuthorizationRoleAccountingFull"); TranslationKeysToFetch.Add("AuthorizationRoleAccounting");
TranslationKeysToFetch.Add("AuthorizationRoleTechLimited"); TranslationKeysToFetch.Add("AuthorizationRoleTechRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleTechFull"); TranslationKeysToFetch.Add("AuthorizationRoleTech");
TranslationKeysToFetch.Add("AuthorizationRoleSubContractorLimited"); TranslationKeysToFetch.Add("AuthorizationRoleSubContractorRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleSubContractorFull"); TranslationKeysToFetch.Add("AuthorizationRoleSubContractor");
TranslationKeysToFetch.Add("AuthorizationRoleCustomerLimited"); TranslationKeysToFetch.Add("AuthorizationRoleCustomerRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleCustomerFull"); TranslationKeysToFetch.Add("AuthorizationRoleCustomer");
TranslationKeysToFetch.Add("AuthorizationRoleOpsAdminLimited"); TranslationKeysToFetch.Add("AuthorizationRoleOpsAdminRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleOpsAdminFull"); TranslationKeysToFetch.Add("AuthorizationRoleOpsAdmin");
TranslationKeysToFetch.Add("AuthorizationRoleSalesLimited"); TranslationKeysToFetch.Add("AuthorizationRoleSalesRestricted");
TranslationKeysToFetch.Add("AuthorizationRoleSalesFull"); TranslationKeysToFetch.Add("AuthorizationRoleSales");
// TranslationKeysToFetch.Add("AuthorizationRoleAll"); // TranslationKeysToFetch.Add("AuthorizationRoleAll");
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId); var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
// ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleNoRole"], Id = (long)AuthorizationRoles.NoRole }); // ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleNoRole"], Id = (long)AuthorizationRoles.NoRole });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminLimited"], Id = (long)AuthorizationRoles.BizAdminLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminRestricted"], Id = (long)AuthorizationRoles.BizAdminRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdminFull"], Id = (long)AuthorizationRoles.BizAdminFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleBizAdmin"], Id = (long)AuthorizationRoles.BizAdmin });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchLimited"], Id = (long)AuthorizationRoles.DispatchLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleServiceRestricted"], Id = (long)AuthorizationRoles.ServiceRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleDispatchFull"], Id = (long)AuthorizationRoles.DispatchFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleService"], Id = (long)AuthorizationRoles.Service });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryLimited"], Id = (long)AuthorizationRoles.InventoryLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryRestricted"], Id = (long)AuthorizationRoles.InventoryRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventoryFull"], Id = (long)AuthorizationRoles.InventoryFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleInventory"], Id = (long)AuthorizationRoles.Inventory });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAccountingFull"], Id = (long)AuthorizationRoles.AccountingFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAccounting"], Id = (long)AuthorizationRoles.Accounting });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechLimited"], Id = (long)AuthorizationRoles.TechLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechRestricted"], Id = (long)AuthorizationRoles.TechRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTechFull"], Id = (long)AuthorizationRoles.TechFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleTech"], Id = (long)AuthorizationRoles.Tech });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorLimited"], Id = (long)AuthorizationRoles.SubContractorLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorRestricted"], Id = (long)AuthorizationRoles.SubContractorRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractorFull"], Id = (long)AuthorizationRoles.SubContractorFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSubContractor"], Id = (long)AuthorizationRoles.SubContractor });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleCustomerLimited"], Id = (long)AuthorizationRoles.CustomerLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleCustomerRestricted"], Id = (long)AuthorizationRoles.CustomerRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleCustomerFull"], Id = (long)AuthorizationRoles.CustomerFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleCustomer"], Id = (long)AuthorizationRoles.Customer });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminLimited"], Id = (long)AuthorizationRoles.OpsAdminLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminRestricted"], Id = (long)AuthorizationRoles.OpsAdminRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdminFull"], Id = (long)AuthorizationRoles.OpsAdminFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleOpsAdmin"], Id = (long)AuthorizationRoles.OpsAdmin });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSalesLimited"], Id = (long)AuthorizationRoles.SalesLimited }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSalesRestricted"], Id = (long)AuthorizationRoles.SalesRestricted });
ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSalesFull"], Id = (long)AuthorizationRoles.SalesFull }); ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleSales"], Id = (long)AuthorizationRoles.Sales });
// ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAll"], Id = (long)AuthorizationRoles.All }); // ReturnList.Add(new NameIdItem() { Name = LT["AuthorizationRoleAll"], Id = (long)AuthorizationRoles.All });
} }

View File

@@ -6,7 +6,7 @@ namespace AyaNova.DataList
{ {
public EventDataList() public EventDataList()
{ {
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type //NOTE: used this type because it's full BizFull and read only Bizrestricted only which is appropriate and there is no event type
DefaultListAType = AyaType.Global; DefaultListAType = AyaType.Global;
SQLFrom = "from aevent left join auser on (aevent.userid=auser.id)"; SQLFrom = "from aevent left join auser on (aevent.userid=auser.id)";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType); var RoleSet = BizRoles.GetRoleSet(DefaultListAType);

View File

@@ -165,11 +165,11 @@ namespace AyaNova.DataList
{ {
List<DataListFilterOption> ret = new List<DataListFilterOption>(); List<DataListFilterOption> ret = new List<DataListFilterOption>();
bool HasSupervisorRole = bool HasSupervisorRole =
userRoles.HasFlag(AuthorizationRoles.BizAdminFull) userRoles.HasFlag(AuthorizationRoles.BizAdmin)
|| userRoles.HasFlag(AuthorizationRoles.DispatchFull) || userRoles.HasFlag(AuthorizationRoles.Service)
|| userRoles.HasFlag(AuthorizationRoles.InventoryFull) || userRoles.HasFlag(AuthorizationRoles.Inventory)
|| userRoles.HasFlag(AuthorizationRoles.SalesFull) || userRoles.HasFlag(AuthorizationRoles.Sales)
|| userRoles.HasFlag(AuthorizationRoles.AccountingFull); || userRoles.HasFlag(AuthorizationRoles.Accounting);
if (!HasSupervisorRole) if (!HasSupervisorRole)
{ {

View File

@@ -593,7 +593,7 @@ namespace AyaNova
ServerGlobalOpsSettingsCache.Initialize(dbContext); ServerGlobalOpsSettingsCache.Initialize(dbContext);
//Ensure translations are present, not missing any keys and that there is a server default translation that exists //Ensure translations are present, not missing any keys and that there is a server default translation that exists
TranslationBiz lb = new TranslationBiz(dbContext, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.OpsAdminFull); TranslationBiz lb = new TranslationBiz(dbContext, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.OpsAdmin);
lb.ValidateTranslationsAsync().Wait(); lb.ValidateTranslationsAsync().Wait();

View File

@@ -14,50 +14,50 @@ namespace AyaNova.Biz
///<summary>No role set</summary> ///<summary>No role set</summary>
NoRole = 0, NoRole = 0,
///<summary>BizAdminLimited</summary> ///<summary>BizAdminRestricted</summary>
BizAdminLimited = 1, BizAdminRestricted = 1,
///<summary>BizAdminFull</summary> ///<summary>BizAdmin</summary>
BizAdminFull = 2, BizAdmin = 2,
///<summary>DispatchLimited</summary> ///<summary>ServiceRestricted</summary>
DispatchLimited = 4, ServiceRestricted = 4,
///<summary>DispatchFull</summary> ///<summary>Service</summary>
DispatchFull = 8, Service = 8,
///<summary>InventoryLimited</summary> ///<summary>InventoryRestricted</summary>
InventoryLimited = 16, InventoryRestricted = 16,
///<summary>InventoryFull</summary> ///<summary>Inventory</summary>
InventoryFull = 32, Inventory = 32,
///<summary>AccountingFull</summary> ///<summary>Accounting</summary>
AccountingFull = 64,//No limited role, not sure if there is a need Accounting = 64,//No limited role, not sure if there is a need
///<summary>TechLimited</summary> ///<summary>TechRestricted</summary>
TechLimited = 128, TechRestricted = 128,
///<summary>TechFull</summary> ///<summary>Tech</summary>
TechFull = 256, Tech = 256,
///<summary>SubContractorLimited</summary> ///<summary>SubContractorRestricted</summary>
SubContractorLimited = 512, //same as tech but restricted by further business rules (more fine grained) SubContractorRestricted = 512, //same as tech but restricted by further business rules (more fine grained)
///<summary>SubContractorFull</summary> ///<summary>SubContractor</summary>
SubContractorFull = 1024,//same as tech limited but restricted by further business rules (more fine grained) SubContractor = 1024,//same as tech limited but restricted by further business rules (more fine grained)
///<summary>ClientLimited</summary> ///<summary>ClientRestricted</summary>
CustomerLimited = 2048, CustomerRestricted = 2048,
///<summary>ClientFull</summary> ///<summary>Client</summary>
CustomerFull = 4096, Customer = 4096,
///<summary>OpsAdminLimited</summary> ///<summary>OpsAdminRestricted</summary>
OpsAdminLimited = 8192, OpsAdminRestricted = 8192,
///<summary>OpsAdminFull</summary> ///<summary>OpsAdmin</summary>
OpsAdminFull = 16384, OpsAdmin = 16384,
///<summary>SalesFull</summary> ///<summary>Sales</summary>
SalesFull = 32768, Sales = 32768,
///<summary>SalesLimited</summary> ///<summary>SalesRestricted</summary>
SalesLimited = 65536, SalesRestricted = 65536,
///<summary>Anyone of any role</summary> ///<summary>Anyone of any role</summary>
All = BizAdminLimited | BizAdminFull | DispatchLimited | DispatchFull | InventoryLimited | All = BizAdminRestricted | BizAdmin | ServiceRestricted | Service | InventoryRestricted |
InventoryFull | AccountingFull | TechLimited | TechFull | SubContractorLimited | Inventory | Accounting | TechRestricted | Tech | SubContractorRestricted |
SubContractorFull | CustomerLimited | CustomerFull | OpsAdminLimited | OpsAdminFull | SalesFull | SalesLimited, SubContractor | CustomerRestricted | Customer | OpsAdminRestricted | OpsAdmin | Sales | SalesRestricted,
AllInsideUserRoles = BizAdminLimited | BizAdminFull | DispatchLimited | DispatchFull | InventoryLimited | AllInsideUserRoles = BizAdminRestricted | BizAdmin | ServiceRestricted | Service | InventoryRestricted |
InventoryFull | AccountingFull | TechLimited | TechFull | SubContractorLimited | Inventory | Accounting | TechRestricted | Tech | SubContractorRestricted |
SubContractorFull | SalesFull | SalesLimited | OpsAdminLimited | OpsAdminFull SubContractor | Sales | SalesRestricted | OpsAdminRestricted | OpsAdmin

View File

@@ -46,15 +46,15 @@ namespace AyaNova.Biz
// (any change copy to customer notes, head office) // (any change copy to customer notes, head office)
roles.Add(AyaType.Customer, new BizRoleSet() roles.Add(AyaType.Customer, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -63,15 +63,15 @@ namespace AyaNova.Biz
// (duplicate of customer above but required to be here to allow various code to not bomb) // (duplicate of customer above but required to be here to allow various code to not bomb)
roles.Add(AyaType.CustomerNote, new BizRoleSet() roles.Add(AyaType.CustomerNote, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -80,15 +80,15 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Contract, new BizRoleSet() roles.Add(AyaType.Contract, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -97,15 +97,15 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.HeadOffice, new BizRoleSet() roles.Add(AyaType.HeadOffice, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -114,15 +114,15 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.LoanUnit, new BizRoleSet() roles.Add(AyaType.LoanUnit, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -135,13 +135,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Part, new BizRoleSet() roles.Add(AyaType.Part, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -150,13 +150,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PartInventory, new BizRoleSet() roles.Add(AyaType.PartInventory, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -168,13 +168,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PartWarehouse, new BizRoleSet() roles.Add(AyaType.PartWarehouse, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -183,13 +183,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PartAssembly, new BizRoleSet() roles.Add(AyaType.PartAssembly, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -199,13 +199,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PurchaseOrder, new BizRoleSet() roles.Add(AyaType.PurchaseOrder, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -215,13 +215,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PartInventoryRequest, new BizRoleSet() roles.Add(AyaType.PartInventoryRequest, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -231,13 +231,13 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PartInventoryRestock, new BizRoleSet() roles.Add(AyaType.PartInventoryRestock, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull Change = AuthorizationRoles.Inventory
| AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdmin
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.InventoryLimited | AuthorizationRoles.InventoryRestricted
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited, | AuthorizationRoles.ServiceRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -247,15 +247,15 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PM, new BizRoleSet() roles.Add(AyaType.PM, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -264,8 +264,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PMItem, new BizRoleSet() roles.Add(AyaType.PMItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -274,8 +274,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PMTemplate, new BizRoleSet() roles.Add(AyaType.PMTemplate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -284,8 +284,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PMTemplateItem, new BizRoleSet() roles.Add(AyaType.PMTemplateItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -294,15 +294,15 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Project, new BizRoleSet() roles.Add(AyaType.Project, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull Change = AuthorizationRoles.BizAdmin
| AuthorizationRoles.DispatchFull | AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.AccountingFull, | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -312,14 +312,14 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.ServiceRate, new BizRoleSet() roles.Add(AyaType.ServiceRate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -329,14 +329,14 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.TravelRate, new BizRoleSet() roles.Add(AyaType.TravelRate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -345,14 +345,14 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.TaxCode, new BizRoleSet() roles.Add(AyaType.TaxCode, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.DispatchFull ReadFullRecord = AuthorizationRoles.Service
| AuthorizationRoles.SalesFull | AuthorizationRoles.Sales
| AuthorizationRoles.TechFull | AuthorizationRoles.Tech
| AuthorizationRoles.BizAdminLimited | AuthorizationRoles.BizAdminRestricted
| AuthorizationRoles.DispatchLimited | AuthorizationRoles.ServiceRestricted
| AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted
| AuthorizationRoles.TechLimited, | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -367,12 +367,12 @@ namespace AyaNova.Biz
// //when deducting from the bank the role required is for the object that is being banked // //when deducting from the bank the role required is for the object that is being banked
// //Subcontractors are deliberately excluded here // //Subcontractors are deliberately excluded here
// //on the fence about sales as it's conceivable that a salesman sells bank time and then enters it but // //on the fence about sales as it's conceivable that a salesman sells bank time and then enters it but
// //that's really in the realm of accounting, bizadmin or most obviously dispatch // //that's really in the realm of accounting, bizadmin or most obviously Service
// Change = AuthorizationRoles.BizAdm inFu ll // Change = AuthorizationRoles.BizAdm inFu ll
// | AuthorizationRoles.DispatchFull // | AuthorizationRoles.Servi ceFul l
// | AuthorizationRoles.Account ingFu ll, // | AuthorizationRoles.Account ingFu ll,
// ReadFullRecord = AuthorizationRoles.Biz AdminLim ited // ReadFullRecord = AuthorizationRoles.Biz AdminLim ited
// | AuthorizationRoles.DispatchLimited // | AuthorizationRoles.Se rviceLim ited
// | AuthorizationRoles.Sa lesLim ited // | AuthorizationRoles.Sa lesLim ited
// | AuthorizationRoles.Te chLi mited // | AuthorizationRoles.Te chLi mited
// | AuthorizationRoles.Sa lesF ull // | AuthorizationRoles.Sa lesF ull
@@ -385,8 +385,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Quote, new BizRoleSet() roles.Add(AyaType.Quote, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -395,8 +395,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.QuoteItem, new BizRoleSet() roles.Add(AyaType.QuoteItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -405,8 +405,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.QuoteTemplate, new BizRoleSet() roles.Add(AyaType.QuoteTemplate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -415,8 +415,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.QuoteTemplateItem, new BizRoleSet() roles.Add(AyaType.QuoteTemplateItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -425,8 +425,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Unit, new BizRoleSet() roles.Add(AyaType.Unit, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -435,8 +435,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.UnitModel, new BizRoleSet() roles.Add(AyaType.UnitModel, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -445,8 +445,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Vendor, new BizRoleSet() roles.Add(AyaType.Vendor, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull | AuthorizationRoles.InventoryFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting | AuthorizationRoles.Inventory,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -457,7 +457,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.TaskGroup, new BizRoleSet() roles.Add(AyaType.TaskGroup, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service,
ReadFullRecord = AuthorizationRoles.All, ReadFullRecord = AuthorizationRoles.All,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -469,7 +469,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrderStatus, new BizRoleSet() roles.Add(AyaType.WorkOrderStatus, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull,//powerful feature, only want people directly in charge of service to change these Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service,//powerful feature, only want people directly in charge of service to change these
ReadFullRecord = AuthorizationRoles.All, ReadFullRecord = AuthorizationRoles.All,
Select = AuthorizationRoles.All//sub restricted by client and biz rules as status has it's own role settings so just keep it open for everyone to potentially access Select = AuthorizationRoles.All//sub restricted by client and biz rules as status has it's own role settings so just keep it open for everyone to potentially access
}); });
@@ -479,9 +479,9 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrderItemStatus, new BizRoleSet() roles.Add(AyaType.WorkOrderItemStatus, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited | AuthorizationRoles.CustomerLimited | AuthorizationRoles.CustomerFull, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted | AuthorizationRoles.CustomerRestricted | AuthorizationRoles.Customer,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -490,9 +490,9 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrderItemPriority, new BizRoleSet() roles.Add(AyaType.WorkOrderItemPriority, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited | AuthorizationRoles.CustomerLimited | AuthorizationRoles.CustomerFull, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted | AuthorizationRoles.CustomerRestricted | AuthorizationRoles.Customer,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -501,96 +501,96 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrder, new BizRoleSet() roles.Add(AyaType.WorkOrder, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited | AuthorizationRoles.CustomerLimited | AuthorizationRoles.CustomerFull, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted | AuthorizationRoles.CustomerRestricted | AuthorizationRoles.Customer,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItem, new BizRoleSet() roles.Add(AyaType.WorkOrderItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited | AuthorizationRoles.CustomerLimited | AuthorizationRoles.CustomerFull, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted | AuthorizationRoles.CustomerRestricted | AuthorizationRoles.Customer,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemExpense, new BizRoleSet() roles.Add(AyaType.WorkOrderItemExpense, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemLabor, new BizRoleSet() roles.Add(AyaType.WorkOrderItemLabor, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemLoan, new BizRoleSet() roles.Add(AyaType.WorkOrderItemLoan, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemPart, new BizRoleSet() roles.Add(AyaType.WorkOrderItemPart, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemPartRequest, new BizRoleSet() roles.Add(AyaType.WorkOrderItemPartRequest, new BizRoleSet()
{ {
Change = AuthorizationRoles.InventoryFull | AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull, Change = AuthorizationRoles.Inventory | AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemScheduledUser, new BizRoleSet() roles.Add(AyaType.WorkOrderItemScheduledUser, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemTask, new BizRoleSet() roles.Add(AyaType.WorkOrderItemTask, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemTravel, new BizRoleSet() roles.Add(AyaType.WorkOrderItemTravel, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemUnit, new BizRoleSet() roles.Add(AyaType.WorkOrderItemUnit, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
roles.Add(AyaType.WorkOrderItemOutsideService, new BizRoleSet() roles.Add(AyaType.WorkOrderItemOutsideService, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.TechFull | AuthorizationRoles.SubContractorFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Tech | AuthorizationRoles.SubContractor | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesFull | ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SubContractorLimited | AuthorizationRoles.TechLimited, AuthorizationRoles.SalesRestricted | AuthorizationRoles.SubContractorRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
//--- //---
@@ -601,8 +601,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrderTemplate, new BizRoleSet() roles.Add(AyaType.WorkOrderTemplate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -611,8 +611,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.WorkOrderTemplateItem, new BizRoleSet() roles.Add(AyaType.WorkOrderTemplateItem, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.SalesFull | AuthorizationRoles.TechFull | AuthorizationRoles.AccountingFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Sales | AuthorizationRoles.Tech | AuthorizationRoles.Accounting,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.SalesLimited | AuthorizationRoles.TechLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -624,8 +624,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Global, new BizRoleSet() roles.Add(AyaType.Global, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
}); });
@@ -634,8 +634,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.GlobalOps, new BizRoleSet() roles.Add(AyaType.GlobalOps, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.OpsAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdminRestricted
}); });
@@ -644,8 +644,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.User, new BizRoleSet() roles.Add(AyaType.User, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -655,8 +655,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.UserOptions, new BizRoleSet() roles.Add(AyaType.UserOptions, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
}); });
@@ -666,8 +666,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Widget, new BizRoleSet() roles.Add(AyaType.Widget, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.InventoryFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Inventory,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.InventoryLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.InventoryRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -676,7 +676,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.ServerState, new BizRoleSet() roles.Add(AyaType.ServerState, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.All ReadFullRecord = AuthorizationRoles.All
}); });
@@ -686,8 +686,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.License, new BizRoleSet() roles.Add(AyaType.License, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted
}); });
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -695,8 +695,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.TrialSeeder, new BizRoleSet() roles.Add(AyaType.TrialSeeder, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | AuthorizationRoles.OpsAdminLimited ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.OpsAdminRestricted
}); });
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -705,7 +705,7 @@ namespace AyaNova.Biz
roles.Add(AyaType.LogFile, new BizRoleSet() roles.Add(AyaType.LogFile, new BizRoleSet()
{ {
Change = AuthorizationRoles.NoRole, Change = AuthorizationRoles.NoRole,
ReadFullRecord = AuthorizationRoles.OpsAdminFull | AuthorizationRoles.OpsAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdmin | AuthorizationRoles.OpsAdminRestricted
}); });
@@ -715,8 +715,8 @@ namespace AyaNova.Biz
//ops and biz admin can view Backup //ops and biz admin can view Backup
roles.Add(AyaType.Backup, new BizRoleSet() roles.Add(AyaType.Backup, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdminRestricted | AuthorizationRoles.BizAdmin | AuthorizationRoles.BizAdminRestricted
}); });
@@ -728,8 +728,8 @@ namespace AyaNova.Biz
// who are not allowed to see biz data // who are not allowed to see biz data
roles.Add(AyaType.FileAttachment, new BizRoleSet() roles.Add(AyaType.FileAttachment, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull,//Need full rights only here because this is the rights checked for batch delete etc so it's simpler than checking all the parent object rights if you know they already have all rights Change = AuthorizationRoles.BizAdmin,//Need full rights only here because this is the rights checked for batch delete etc so it's simpler than checking all the parent object rights if you know they already have all rights
ReadFullRecord = AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.BizAdmin | AuthorizationRoles.BizAdminRestricted
}); });
@@ -739,8 +739,8 @@ namespace AyaNova.Biz
//ops and biz admin can view operations //ops and biz admin can view operations
roles.Add(AyaType.ServerJob, new BizRoleSet() roles.Add(AyaType.ServerJob, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdminRestricted | AuthorizationRoles.BizAdmin | AuthorizationRoles.BizAdminRestricted
}); });
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -749,8 +749,8 @@ namespace AyaNova.Biz
//ops and biz admin can view operations //ops and biz admin can view operations
roles.Add(AyaType.OpsNotificationSettings, new BizRoleSet() roles.Add(AyaType.OpsNotificationSettings, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull, Change = AuthorizationRoles.OpsAdmin,
ReadFullRecord = AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdminRestricted | AuthorizationRoles.BizAdmin | AuthorizationRoles.BizAdminRestricted
}); });
@@ -759,8 +759,8 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.ServerMetrics, new BizRoleSet() roles.Add(AyaType.ServerMetrics, new BizRoleSet()
{ {
Change = AuthorizationRoles.OpsAdminFull,//this is to turn on extra metrics (profiler) Change = AuthorizationRoles.OpsAdmin,//this is to turn on extra metrics (profiler)
ReadFullRecord = AuthorizationRoles.OpsAdminFull | AuthorizationRoles.OpsAdminLimited ReadFullRecord = AuthorizationRoles.OpsAdmin | AuthorizationRoles.OpsAdminRestricted
}); });
@@ -769,10 +769,10 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Translation, new BizRoleSet() roles.Add(AyaType.Translation, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
//Anyone can read it because they need to to open a form, but also in UI //Anyone can read it because they need to to open a form, but also in UI
//only the bizadminlimited actually gets a link to see the customization page //only the BizAdminRestricted actually gets a link to see the customization page
ReadFullRecord = AuthorizationRoles.BizAdminLimited, ReadFullRecord = AuthorizationRoles.BizAdminRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -782,7 +782,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.DataListSavedFilter, new BizRoleSet() roles.Add(AyaType.DataListSavedFilter, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.All ReadFullRecord = AuthorizationRoles.All
}); });
@@ -794,9 +794,9 @@ namespace AyaNova.Biz
roles.Add(AyaType.FormCustom, new BizRoleSet() roles.Add(AyaType.FormCustom, new BizRoleSet()
{ {
//Only BizAdminFull can modify forms //Only BizAdminFull can modify forms
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
//Anyone can read it because they need to to open a form, but also in UI //Anyone can read it because they need to to open a form, but also in UI
//only the bizadminlimited actually gets a link to see the customization page //only the BizAdminRestricted actually gets a link to see the customization page
ReadFullRecord = AuthorizationRoles.All ReadFullRecord = AuthorizationRoles.All
}); });
@@ -805,7 +805,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.PickListTemplate, new BizRoleSet() roles.Add(AyaType.PickListTemplate, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.All ReadFullRecord = AuthorizationRoles.All
}); });
@@ -814,11 +814,11 @@ namespace AyaNova.Biz
// todo: deprecate? Not used for anything as of nov 2020 // todo: deprecate? Not used for anything as of nov 2020
roles.Add(AyaType.BizMetrics, new BizRoleSet() roles.Add(AyaType.BizMetrics, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull, Change = AuthorizationRoles.BizAdmin,
ReadFullRecord = AuthorizationRoles.BizAdminLimited | ReadFullRecord = AuthorizationRoles.BizAdminRestricted |
AuthorizationRoles.SalesFull | AuthorizationRoles.Sales |
AuthorizationRoles.SalesLimited | AuthorizationRoles.SalesRestricted |
AuthorizationRoles.AccountingFull AuthorizationRoles.Accounting
}); });
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@@ -844,7 +844,7 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.Report, new BizRoleSet() roles.Add(AyaType.Report, new BizRoleSet()
{ {
Change = AuthorizationRoles.BizAdminFull | AuthorizationRoles.BizAdminLimited, Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.BizAdminRestricted,
ReadFullRecord = AuthorizationRoles.All, ReadFullRecord = AuthorizationRoles.All,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });
@@ -854,9 +854,9 @@ namespace AyaNova.Biz
// //
roles.Add(AyaType.CustomerServiceRequest, new BizRoleSet() roles.Add(AyaType.CustomerServiceRequest, new BizRoleSet()
{ {
Change = AuthorizationRoles.CustomerFull | AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull, Change = AuthorizationRoles.Customer | AuthorizationRoles.BizAdmin | AuthorizationRoles.Service,
ReadFullRecord = AuthorizationRoles.CustomerLimited | AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | ReadFullRecord = AuthorizationRoles.CustomerRestricted | AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted |
AuthorizationRoles.TechFull | AuthorizationRoles.TechLimited, AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted,
Select = AuthorizationRoles.All Select = AuthorizationRoles.All
}); });

View File

@@ -86,7 +86,7 @@ MULTIPLE discount / markup ITEMS
if (httpContext != null) if (httpContext != null)
return new ContractBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ContractBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ContractBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ContractBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new CustomerBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new CustomerBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new CustomerBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new CustomerBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -27,7 +27,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new CustomerNoteBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new CustomerNoteBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new CustomerNoteBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new CustomerNoteBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new CustomerServiceRequestBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new CustomerServiceRequestBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new CustomerServiceRequestBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new CustomerServiceRequestBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new DashboardViewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new DashboardViewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new DashboardViewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new DashboardViewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new DataListColumnViewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new DataListColumnViewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new DataListColumnViewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new DataListColumnViewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -30,7 +30,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new DataListSavedFilterBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new DataListSavedFilterBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new DataListSavedFilterBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new DataListSavedFilterBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new FormCustomBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new FormCustomBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new FormCustomBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new FormCustomBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -24,7 +24,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new GlobalBizSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new GlobalBizSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new GlobalBizSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new GlobalBizSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -25,7 +25,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new GlobalOpsBackupSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new GlobalOpsBackupSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new GlobalOpsBackupSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new GlobalOpsBackupSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -25,7 +25,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new GlobalOpsNotificationSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new GlobalOpsNotificationSettingsBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new GlobalOpsNotificationSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new GlobalOpsNotificationSettingsBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new HeadOfficeBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new HeadOfficeBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new HeadOfficeBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new HeadOfficeBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new LoanUnitBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new LoanUnitBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new LoanUnitBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new LoanUnitBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new MemoBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new MemoBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new MemoBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new MemoBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new NotifySubscriptionBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new NotifySubscriptionBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new NotifySubscriptionBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new NotifySubscriptionBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -11,7 +11,7 @@ namespace AyaNova.Biz
internal class PMBiz : BizObject, ISearchAbleObject internal class PMBiz : BizObject, ISearchAbleObject
{ {
//Feature specific roles //Feature specific roles
internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.AccountingFull; internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Accounting;
internal PMBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles) internal PMBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles)
{ {
@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PMBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PMBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new PMBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PMBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -23,7 +23,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PMTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PMTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PMTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PMTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PartAssemblyBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PartAssemblyBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PartAssemblyBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PartAssemblyBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PartBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PartBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PartBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PartBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -26,7 +26,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PartInventoryBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PartInventoryBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PartInventoryBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PartInventoryBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PartWarehouseBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PartWarehouseBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PartWarehouseBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PartWarehouseBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -30,7 +30,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PickListBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PickListBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PickListBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PickListBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -25,7 +25,7 @@ namespace AyaNova.Biz
u.Salt = Hasher.GenerateSalt(); u.Salt = Hasher.GenerateSalt();
u.Login = "superuser"; u.Login = "superuser";
u.Password = Hasher.hash(u.Salt, "l3tm3in"); u.Password = Hasher.hash(u.Salt, "l3tm3in");
u.Roles = AuthorizationRoles.All;//AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull; u.Roles = AuthorizationRoles.All;//AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull | AuthorizationRoles.ServiceFull | AuthorizationRoles.InventoryFull;
u.UserType = UserType.NotService; u.UserType = UserType.NotService;

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new ProjectBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ProjectBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ProjectBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ProjectBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new PurchaseOrderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new PurchaseOrderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new PurchaseOrderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new PurchaseOrderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -11,7 +11,7 @@ namespace AyaNova.Biz
internal class QuoteBiz : BizObject, ISearchAbleObject internal class QuoteBiz : BizObject, ISearchAbleObject
{ {
//Feature specific roles //Feature specific roles
internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.AccountingFull; internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Accounting;
internal QuoteBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles) internal QuoteBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles)
{ {
@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new QuoteBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new QuoteBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new QuoteBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new QuoteBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -26,7 +26,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new QuoteTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new QuoteTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new QuoteTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new QuoteTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new ReminderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ReminderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ReminderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ReminderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -30,7 +30,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new ReportBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ReportBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ReportBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ReportBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new ReviewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ReviewBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ReviewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ReviewBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////
@@ -227,20 +227,20 @@ namespace AyaNova.Biz
private async Task ValidateAsync(Review proposedObj, Review currentObj) private async Task ValidateAsync(Review proposedObj, Review currentObj)
{ {
/* /*
- RULE Roles: BizAdminFull, DispatchFull, InventoryFull, Accounting, SalesFull can create and assign to anyone else. - RULE Roles: BizAdminFull, ServiceFull, InventoryFull, Accounting, SalesFull can create and assign to anyone else.
- RULE Any other inside role can create for themselves only. (outside roles have no rights to this object so no need to check) - RULE Any other inside role can create for themselves only. (outside roles have no rights to this object so no need to check)
- RULE Limited roles can only set completed date and enter completion notes not otherwise change or create or delete. - RULE Restricted roles can only set completed date and enter completion notes not otherwise change or create or delete.
- BIZ RULE users with more than limited roles can assign other users - BIZ RULE users with more than restricted roles can assign other users
*/ */
bool isNew = currentObj == null; bool isNew = currentObj == null;
bool SelfAssigned = proposedObj.AssignedByUserId == UserId && proposedObj.UserId == UserId; bool SelfAssigned = proposedObj.AssignedByUserId == UserId && proposedObj.UserId == UserId;
bool HasSupervisorRole = bool HasSupervisorRole =
CurrentUserRoles.HasFlag(AuthorizationRoles.BizAdminFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.BizAdmin) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.DispatchFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Service) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.InventoryFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Inventory) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.SalesFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Sales) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.AccountingFull); CurrentUserRoles.HasFlag(AuthorizationRoles.Accounting);
//Checks for non supervisors //Checks for non supervisors
if (!HasSupervisorRole) if (!HasSupervisorRole)
@@ -313,11 +313,11 @@ namespace AyaNova.Biz
{ {
bool SelfAssigned = inObj.AssignedByUserId == UserId && inObj.UserId == UserId; bool SelfAssigned = inObj.AssignedByUserId == UserId && inObj.UserId == UserId;
bool HasSupervisorRole = bool HasSupervisorRole =
CurrentUserRoles.HasFlag(AuthorizationRoles.BizAdminFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.BizAdmin) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.DispatchFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Service) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.InventoryFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Inventory) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.SalesFull) || CurrentUserRoles.HasFlag(AuthorizationRoles.Sales) ||
CurrentUserRoles.HasFlag(AuthorizationRoles.AccountingFull); CurrentUserRoles.HasFlag(AuthorizationRoles.Accounting);
if (!SelfAssigned && !HasSupervisorRole) if (!SelfAssigned && !HasSupervisorRole)
AddError(ApiErrorCode.NOT_AUTHORIZED); AddError(ApiErrorCode.NOT_AUTHORIZED);
} }

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new ServiceRateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new ServiceRateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new ServiceRateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new ServiceRateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -27,7 +27,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new TagBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new TagBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new TagBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new TagBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -31,7 +31,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new TaskGroupBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new TaskGroupBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new TaskGroupBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new TaskGroupBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new TaxCodeBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new TaxCodeBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new TaxCodeBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new TaxCodeBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -29,7 +29,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new TranslationBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new TranslationBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new TranslationBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new TranslationBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new TravelRateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new TravelRateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new TravelRateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new TravelRateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new UnitBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new UnitBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new UnitBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new UnitBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new UnitModelBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new UnitModelBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new UnitModelBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new UnitModelBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -216,7 +216,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new UserBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new UserBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new UserBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new UserBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -28,7 +28,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new VendorBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new VendorBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new VendorBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new VendorBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -31,7 +31,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WidgetBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WidgetBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new WidgetBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WidgetBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -17,7 +17,7 @@ namespace AyaNova.Biz
internal class WorkOrderBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject internal class WorkOrderBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject
{ {
// //Feature specific roles // //Feature specific roles
// internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.AccountingFull; // internal static AuthorizationRoles RolesAllowedToChangeSerial = AuthorizationRoles.BizAdminFull | AuthorizationRoles.ServiceFull | AuthorizationRoles.AccountingFull;
internal WorkOrderBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles) internal WorkOrderBiz(AyContext dbcontext, long currentUserId, long userTranslationId, AuthorizationRoles UserRoles)
{ {
@@ -33,7 +33,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WorkOrderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WorkOrderBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new WorkOrderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WorkOrderBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WorkOrderItemPriorityBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WorkOrderItemPriorityBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new WorkOrderItemPriorityBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WorkOrderItemPriorityBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WorkOrderItemStatusBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WorkOrderItemStatusBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new WorkOrderItemStatusBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WorkOrderItemStatusBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WorkOrderStatusBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WorkOrderStatusBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else else
return new WorkOrderStatusBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WorkOrderStatusBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }
//////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -27,7 +27,7 @@ namespace AyaNova.Biz
if (httpContext != null) if (httpContext != null)
return new WorkOrderTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items)); return new WorkOrderTemplateBiz(ct, UserIdFromContext.Id(httpContext.Items), UserTranslationIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
else//when called internally for internal ops there will be no context so need to set default values for that else//when called internally for internal ops there will be no context so need to set default values for that
return new WorkOrderTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdminFull); return new WorkOrderTemplateBiz(ct, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.BizAdmin);
} }

View File

@@ -1697,23 +1697,23 @@
"UserTypeServiceContractor": "Subunternehmer", "UserTypeServiceContractor": "Subunternehmer",
"AuthorizationRoles": "Autorisierungsrollen", "AuthorizationRoles": "Autorisierungsrollen",
"AuthorizationRoleNoRole": "Keine Rolle", "AuthorizationRoleNoRole": "Keine Rolle",
"AuthorizationRoleBizAdminLimited": "Geschäftsverwaltung - beschränkt", "AuthorizationRoleBizAdminRestricted": "Betriebswirtschaftslehre - eingeschränkt",
"AuthorizationRoleBizAdminFull": "Business administration - unbeschränkt", "AuthorizationRoleBizAdmin": "Betriebswirtschaftslehre",
"AuthorizationRoleDispatchLimited": "Versand - beschränkt", "AuthorizationRoleServiceRestricted": "Service - eingeschränkt",
"AuthorizationRoleDispatchFull": "Versand - unbeschränkt", "AuthorizationRoleService": "Service",
"AuthorizationRoleInventoryLimited": "Inventar - beschränkt", "AuthorizationRoleInventoryRestricted": "Inventar - eingeschränkt",
"AuthorizationRoleInventoryFull": "Inventar - unbeschränkt", "AuthorizationRoleInventory": "Inventar",
"AuthorizationRoleAccountingFull": "Buchhaltung", "AuthorizationRoleAccounting": "Buchhaltung",
"AuthorizationRoleTechLimited": "Servicetechniker - beschränkt", "AuthorizationRoleTechRestricted": "Servicetechniker - eingeschränkt",
"AuthorizationRoleTechFull": "Servicetechniker - unbeschränkt", "AuthorizationRoleTech": "Servicetechniker",
"AuthorizationRoleSubContractorLimited": "Subunternehmer - beschränkt", "AuthorizationRoleSubContractorRestricted": "Subunternehmer - eingeschränkt",
"AuthorizationRoleSubContractorFull": "Subunternehmer - unbeschränkt", "AuthorizationRoleSubContractor": "Subunternehmer",
"AuthorizationRoleCustomerLimited": "Kundenbenutzer - beschränkt", "AuthorizationRoleCustomerRestricted": "Kundenbenutzer - eingeschränkt",
"AuthorizationRoleCustomerFull": "Kundenbenutzer - unbeschränkt", "AuthorizationRoleCustomer": "Kundenbenutzer",
"AuthorizationRoleOpsAdminLimited": "Systemvorgänge - beschränkt", "AuthorizationRoleOpsAdminRestricted": "Systemvorgänge - eingeschränkt",
"AuthorizationRoleOpsAdminFull": "Systemvorgänge - unbeschränkt", "AuthorizationRoleOpsAdmin": "Systemvorgänge",
"AuthorizationRoleSalesLimited": "Verkaufsabteilung - beschränkt", "AuthorizationRoleSalesRestricted": "Verkaufsabteilung - eingeschränkt",
"AuthorizationRoleSalesFull": "Verkaufsabteilung - unbeschränkt", "AuthorizationRoleSales": "Verkaufsabteilung",
"AuthorizationRoleAll": "Alle rollen", "AuthorizationRoleAll": "Alle rollen",
"Welcome": "Willkommen in AyaNova", "Welcome": "Willkommen in AyaNova",
"ThankYouForEvaluating": "Vielen Dank, dass Sie AyaNova ausprobiert haben. Verwenden Sie die folgenden Links, um AyaNova zu erkunden und festzustellen, ob es zu Ihrer Organisation passt.", "ThankYouForEvaluating": "Vielen Dank, dass Sie AyaNova ausprobiert haben. Verwenden Sie die folgenden Links, um AyaNova zu erkunden und festzustellen, ob es zu Ihrer Organisation passt.",

View File

@@ -1697,23 +1697,23 @@
"UserTypeServiceContractor": "SubContractor user", "UserTypeServiceContractor": "SubContractor user",
"AuthorizationRoles": "Authorization roles", "AuthorizationRoles": "Authorization roles",
"AuthorizationRoleNoRole": "No role", "AuthorizationRoleNoRole": "No role",
"AuthorizationRoleBizAdminLimited": "Business administration - limited", "AuthorizationRoleBizAdminRestricted": "Business administration - restricted",
"AuthorizationRoleBizAdminFull": "Business administration - full", "AuthorizationRoleBizAdmin": "Business administration",
"AuthorizationRoleDispatchLimited": "Dispatch - limited", "AuthorizationRoleServiceRestricted": "Service - restricted",
"AuthorizationRoleDispatchFull": "Dispatch - full", "AuthorizationRoleService": "Service",
"AuthorizationRoleInventoryLimited": "Inventory - limited", "AuthorizationRoleInventoryRestricted": "Inventory - restricted",
"AuthorizationRoleInventoryFull": "Inventory - full", "AuthorizationRoleInventory": "Inventory",
"AuthorizationRoleAccountingFull": "Accounting", "AuthorizationRoleAccounting": "Accounting",
"AuthorizationRoleTechLimited": "Service technician - limited", "AuthorizationRoleTechRestricted": "Service technician - restricted",
"AuthorizationRoleTechFull": "Service technician - full", "AuthorizationRoleTech": "Service technician",
"AuthorizationRoleSubContractorLimited": "Subcontractor - limited", "AuthorizationRoleSubContractorRestricted": "Subcontractor - restricted",
"AuthorizationRoleSubContractorFull": "Subcontractor - full", "AuthorizationRoleSubContractor": "Subcontractor",
"AuthorizationRoleCustomerLimited": "Customer user - limited", "AuthorizationRoleCustomerRestricted": "Customer user - restricted",
"AuthorizationRoleCustomerFull": "Customer user - full", "AuthorizationRoleCustomer": "Customer user",
"AuthorizationRoleOpsAdminLimited": "System operations - limited", "AuthorizationRoleOpsAdminRestricted": "System operations - restricted",
"AuthorizationRoleOpsAdminFull": "System operations - full", "AuthorizationRoleOpsAdmin": "System operations",
"AuthorizationRoleSalesLimited": "Sales - limited", "AuthorizationRoleSalesRestricted": "Sales - restricted",
"AuthorizationRoleSalesFull": "Sales - full", "AuthorizationRoleSales": "Sales",
"AuthorizationRoleAll": "All roles", "AuthorizationRoleAll": "All roles",
"Welcome": "Welcome to AyaNova", "Welcome": "Welcome to AyaNova",
"ThankYouForEvaluating": "Thank you for trying AyaNova. Please use the following links to help explore AyaNova and see if it is a good match for your organization.", "ThankYouForEvaluating": "Thank you for trying AyaNova. Please use the following links to help explore AyaNova and see if it is a good match for your organization.",

View File

@@ -1697,23 +1697,23 @@
"UserTypeServiceContractor": "Subcontratista", "UserTypeServiceContractor": "Subcontratista",
"AuthorizationRoles": "Roles de autorización", "AuthorizationRoles": "Roles de autorización",
"AuthorizationRoleNoRole": "Sin rol", "AuthorizationRoleNoRole": "Sin rol",
"AuthorizationRoleBizAdminLimited": "Administracion de empresas - limitada", "AuthorizationRoleBizAdminRestricted": "Administración de empresas - restringido",
"AuthorizationRoleBizAdminFull": "Administración de empresas - completa", "AuthorizationRoleBizAdmin": "Administración de empresas",
"AuthorizationRoleDispatchLimited": "Despachador - limitada", "AuthorizationRoleServiceRestricted": "Servicio - restringido",
"AuthorizationRoleDispatchFull": "Despachador - completo", "AuthorizationRoleService": "Servicio",
"AuthorizationRoleInventoryLimited": "Inventario - limitada", "AuthorizationRoleInventoryRestricted": "Inventario - restringido",
"AuthorizationRoleInventoryFull": "Inventario - completo", "AuthorizationRoleInventory": "Inventario",
"AuthorizationRoleAccountingFull": "Contabilidad", "AuthorizationRoleAccounting": "Contabilidad",
"AuthorizationRoleTechLimited": "Técnico de servicio - limitada", "AuthorizationRoleTechRestricted": "Técnico de servicio - restringido",
"AuthorizationRoleTechFull": "Técnico de servicio - completo", "AuthorizationRoleTech": "Técnico de servicio",
"AuthorizationRoleSubContractorLimited": "Subcontratista - limitada", "AuthorizationRoleSubContractorRestricted": "Subcontratista - restringido",
"AuthorizationRoleSubContractorFull": "Subcontratista - completo", "AuthorizationRoleSubContractor": "Subcontratista",
"AuthorizationRoleCustomerLimited": "Usuario cliente - limitada", "AuthorizationRoleCustomerRestricted": "Usuario cliente - restringido",
"AuthorizationRoleCustomerFull": "Usuario cliente - completo", "AuthorizationRoleCustomer": "Usuario cliente",
"AuthorizationRoleOpsAdminLimited": "Operaciones del sistema - limitada", "AuthorizationRoleOpsAdminRestricted": "Operaciones del sistema - restringidas",
"AuthorizationRoleOpsAdminFull": "Operaciones del sistema - completo", "AuthorizationRoleOpsAdmin": "Operaciones del sistema",
"AuthorizationRoleSalesLimited": "Ventas - limitada", "AuthorizationRoleSalesRestricted": "Ventas - restringidas",
"AuthorizationRoleSalesFull": "Ventas - completo", "AuthorizationRoleSales": "Ventas",
"AuthorizationRoleAll": "Todos los roles", "AuthorizationRoleAll": "Todos los roles",
"Welcome": "Bienvenido a AyaNova", "Welcome": "Bienvenido a AyaNova",
"ThankYouForEvaluating": "Gracias por probar AyaNova. Utilice los siguientes enlaces para ayudar a explorar AyaNova y ver si es una buena opción para su organización.", "ThankYouForEvaluating": "Gracias por probar AyaNova. Utilice los siguientes enlaces para ayudar a explorar AyaNova y ver si es una buena opción para su organización.",

View File

@@ -1697,23 +1697,23 @@
"UserTypeServiceContractor": "Sous-traitant", "UserTypeServiceContractor": "Sous-traitant",
"AuthorizationRoles": "Rôles d'autorisation", "AuthorizationRoles": "Rôles d'autorisation",
"AuthorizationRoleNoRole": "Pas de rôle", "AuthorizationRoleNoRole": "Pas de rôle",
"AuthorizationRoleBizAdminLimited": "Administration des affaires - limitée", "AuthorizationRoleBizAdminRestricted": "Administration des affaires - restreint",
"AuthorizationRoleBizAdminFull": "Administration des affaires - complète", "AuthorizationRoleBizAdmin": "Administration des affaires",
"AuthorizationRoleDispatchLimited": "Répartir - limitée", "AuthorizationRoleServiceRestricted": "Service - restreint",
"AuthorizationRoleDispatchFull": "Répartir - complète", "AuthorizationRoleService": "Service",
"AuthorizationRoleInventoryLimited": "Personnel d'inventaire - limité", "AuthorizationRoleInventoryRestricted": "Inventaire - restreint",
"AuthorizationRoleInventoryFull": "Personnel d'inventaire - complète", "AuthorizationRoleInventory": "Inventaire",
"AuthorizationRoleAccountingFull": "Comptabilité", "AuthorizationRoleAccounting": "Comptabilité",
"AuthorizationRoleTechLimited": "Technicien de service - limité", "AuthorizationRoleTechRestricted": "Technicien de service - restreint",
"AuthorizationRoleTechFull": "Technicien de service - complète", "AuthorizationRoleTech": "Technicien de service",
"AuthorizationRoleSubContractorLimited": "Sous-traitant - limité", "AuthorizationRoleSubContractorRestricted": "Sous-traitant - restreint",
"AuthorizationRoleSubContractorFull": "Sous-traitant - complète", "AuthorizationRoleSubContractor": "Sous-traitant",
"AuthorizationRoleCustomerLimited": "Customer utilisateur - limité", "AuthorizationRoleCustomerRestricted": "Customer utilisateur - restreint",
"AuthorizationRoleCustomerFull": "Customer utilisateur - complète", "AuthorizationRoleCustomer": "Customer utilisateur",
"AuthorizationRoleOpsAdminLimited": "Opérations du système - limited", "AuthorizationRoleOpsAdminRestricted": "Opérations du système - restreint",
"AuthorizationRoleOpsAdminFull": "Opérations du système - complète", "AuthorizationRoleOpsAdmin": "Opérations du système",
"AuthorizationRoleSalesLimited": "Ventes - limité", "AuthorizationRoleSalesRestricted": "Ventes - restreint",
"AuthorizationRoleSalesFull": "Ventes - complète", "AuthorizationRoleSales": "Ventes",
"AuthorizationRoleAll": "Tous les rôles", "AuthorizationRoleAll": "Tous les rôles",
"Welcome": "Bienvenue chez AyaNova", "Welcome": "Bienvenue chez AyaNova",
"ThankYouForEvaluating": "Merci d'essayer AyaNova. Veuillez utiliser les liens suivants pour vous aider à explorer AyaNova et voir s'il correspond bien à votre organisation.", "ThankYouForEvaluating": "Merci d'essayer AyaNova. Veuillez utiliser les liens suivants pour vous aider à explorer AyaNova et voir s'il correspond bien à votre organisation.",

View File

@@ -540,7 +540,7 @@ namespace AyaNova.Util
if (await ct.User.AsNoTracking() if (await ct.User.AsNoTracking()
.Where(z => .Where(z =>
z.Login == "BizAdminFull" || z.Login == "BizAdminFull" ||
z.Login == "DispatchFull" || z.Login == "ServiceFull" ||
z.Login == "InventoryFull" || z.Login == "InventoryFull" ||
z.Login == "Accounting" || z.Login == "Accounting" ||
z.Login == "TechFull" z.Login == "TechFull"

View File

@@ -225,9 +225,9 @@ namespace AyaNova.Util
watch.Start(); watch.Start();
//Generate owner and lead tech //Generate owner and lead tech
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.OpsAdminFull, UserType.Service); await SeedUserAsync(log, 1, AuthorizationRoles.BizAdmin | AuthorizationRoles.Service | AuthorizationRoles.Inventory | AuthorizationRoles.OpsAdmin, UserType.Service);
//Generate one office person / secretary //Generate one office person / secretary
await SeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull | AuthorizationRoles.AccountingFull, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.Service | AuthorizationRoles.Inventory | AuthorizationRoles.Accounting, UserType.NotService);
// await SeedWidgetAsync(log, 3);//keeping this here for now but must remove later // await SeedWidgetAsync(log, 3);//keeping this here for now but must remove later
await SeedCustomerAsync(log, 25); await SeedCustomerAsync(log, 25);
await SeedHeadOfficeAsync(log, 10); await SeedHeadOfficeAsync(log, 10);
@@ -263,25 +263,25 @@ namespace AyaNova.Util
watch.Start(); watch.Start();
//One IT administrator, can change ops but nothing else //One IT administrator, can change ops but nothing else
await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdmin, UserType.NotService);
//One business administrator, can view ops issues //One business administrator, can view ops issues
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//One owner who doesn't control anything but views stuff //One owner who doesn't control anything but views stuff
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited | AuthorizationRoles.SalesLimited, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.OpsAdminRestricted | AuthorizationRoles.SalesRestricted, UserType.NotService);
//20 techs //20 techs
await SeedUserAsync(log, 20, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); await SeedUserAsync(log, 20, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//2 subcontractors //2 subcontractors
await SeedUserAsync(log, 2, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); await SeedUserAsync(log, 2, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//3 generic office people people //3 generic office people people
await SeedUserAsync(log, 3, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 3, AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//2 Full sales people //2 Full sales people
await SeedUserAsync(log, 2, AuthorizationRoles.SalesFull, UserType.NotService); await SeedUserAsync(log, 2, AuthorizationRoles.Sales, UserType.NotService);
//1 dispatch manager //1 Service manager
await SeedUserAsync(log, 1, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.Service | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//1 Inventory manager //1 Inventory manager
await SeedUserAsync(log, 1, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.Inventory | AuthorizationRoles.ServiceRestricted, UserType.NotService);
//1 accountant / bookkeeper //1 accountant / bookkeeper
await SeedUserAsync(log, 1, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); await SeedUserAsync(log, 1, AuthorizationRoles.Accounting | AuthorizationRoles.BizAdminRestricted, UserType.NotService);
//await SeedWidgetAsync(log, 100); //await SeedWidgetAsync(log, 100);
await SeedCustomerAsync(log, 500); await SeedCustomerAsync(log, 500);
@@ -320,33 +320,33 @@ namespace AyaNova.Util
//USERS //USERS
//IT administrator, can change ops but nothing else //IT administrator, can change ops but nothing else
await SeedUserAsync(log, 2, AuthorizationRoles.OpsAdminFull, UserType.NotService); await SeedUserAsync(log, 2, AuthorizationRoles.OpsAdmin, UserType.NotService);
//business administrator, can view ops issues //business administrator, can view ops issues
await SeedUserAsync(log, 2, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); await SeedUserAsync(log, 2, AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//owner / upper management who doesn't control anything but views stuff //owner / upper management who doesn't control anything but views stuff
await SeedUserAsync(log, 5, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//TECHS //TECHS
await SeedUserAsync(log, 50, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); await SeedUserAsync(log, 50, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//limited techs //Restricted techs
await SeedUserAsync(log, 10, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Service); await SeedUserAsync(log, 10, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//20 subcontractors //20 subcontractors
await SeedUserAsync(log, 20, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); await SeedUserAsync(log, 20, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//10 limited subcontractors //10 Restricted subcontractors
await SeedUserAsync(log, 10, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor); await SeedUserAsync(log, 10, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
//30 generic office people people //30 generic office people people
await SeedUserAsync(log, 30, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 30, AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//10 Full sales people //10 Full sales people
await SeedUserAsync(log, 10, AuthorizationRoles.SalesFull, UserType.NotService); await SeedUserAsync(log, 10, AuthorizationRoles.Sales, UserType.NotService);
//5 Limited sales people //5 Restricted sales people
await SeedUserAsync(log, 5, AuthorizationRoles.SalesLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.SalesRestricted, UserType.NotService);
//5 dispatch manager //5 Service manager
await SeedUserAsync(log, 5, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.Service | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//5 Inventory manager //5 Inventory manager
await SeedUserAsync(log, 5, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.Inventory | AuthorizationRoles.ServiceRestricted, UserType.NotService);
//10 Inventory manager assistants //10 Inventory manager assistants
await SeedUserAsync(log, 5, AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.InventoryRestricted, UserType.NotService);
//5 accountant / bookkeeper //5 accountant / bookkeeper
await SeedUserAsync(log, 5, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); await SeedUserAsync(log, 5, AuthorizationRoles.Accounting | AuthorizationRoles.BizAdminRestricted, UserType.NotService);
//await SeedWidgetAsync(log, 100); //await SeedWidgetAsync(log, 100);
await SeedCustomerAsync(log, 1000); await SeedCustomerAsync(log, 1000);
@@ -386,33 +386,33 @@ namespace AyaNova.Util
//USERS //USERS
//IT administrator, can change ops but nothing else //IT administrator, can change ops but nothing else
await SeedUserAsync(log, 10, AuthorizationRoles.OpsAdminFull, UserType.NotService); await SeedUserAsync(log, 10, AuthorizationRoles.OpsAdmin, UserType.NotService);
//business administrator, can view ops issues //business administrator, can view ops issues
await SeedUserAsync(log, 10, AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminLimited, UserType.NotService); await SeedUserAsync(log, 10, AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//owner / upper management who doesn't control anything but views stuff //owner / upper management who doesn't control anything but views stuff
await SeedUserAsync(log, 20, AuthorizationRoles.BizAdminLimited | AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited | AuthorizationRoles.OpsAdminLimited, UserType.NotService); await SeedUserAsync(log, 20, AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//regular techs //regular techs
await SeedUserAsync(log, 500, AuthorizationRoles.TechFull | AuthorizationRoles.DispatchLimited, UserType.Service); await SeedUserAsync(log, 500, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//limited techs //Restricted techs
await SeedUserAsync(log, 200, AuthorizationRoles.TechLimited | AuthorizationRoles.DispatchLimited, UserType.Service); await SeedUserAsync(log, 200, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//subcontractors //subcontractors
await SeedUserAsync(log, 80, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor); await SeedUserAsync(log, 80, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//limited subcontractors //Restricted subcontractors
await SeedUserAsync(log, 40, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor); await SeedUserAsync(log, 40, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
//generic office people people //generic office people people
await SeedUserAsync(log, 200, AuthorizationRoles.DispatchLimited | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 200, AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//20 Full sales people //20 Full sales people
await SeedUserAsync(log, 20, AuthorizationRoles.SalesFull, UserType.NotService); await SeedUserAsync(log, 20, AuthorizationRoles.Sales, UserType.NotService);
//10 Limited sales people //10 Restricted sales people
await SeedUserAsync(log, 10, AuthorizationRoles.SalesLimited, UserType.NotService); await SeedUserAsync(log, 10, AuthorizationRoles.SalesRestricted, UserType.NotService);
//dispatch manager //Service manager
await SeedUserAsync(log, 20, AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 20, AuthorizationRoles.Service | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//Inventory manager //Inventory manager
await SeedUserAsync(log, 40, AuthorizationRoles.InventoryFull | AuthorizationRoles.DispatchLimited, UserType.NotService); await SeedUserAsync(log, 40, AuthorizationRoles.Inventory | AuthorizationRoles.ServiceRestricted, UserType.NotService);
//Inventory manager assistants //Inventory manager assistants
await SeedUserAsync(log, 20, AuthorizationRoles.InventoryLimited, UserType.NotService); await SeedUserAsync(log, 20, AuthorizationRoles.InventoryRestricted, UserType.NotService);
//accountant / bookkeeper //accountant / bookkeeper
await SeedUserAsync(log, 20, AuthorizationRoles.AccountingFull | AuthorizationRoles.BizAdminLimited, UserType.NotService); await SeedUserAsync(log, 20, AuthorizationRoles.Accounting | AuthorizationRoles.BizAdminRestricted, UserType.NotService);
//await SeedWidgetAsync(log, 100); //await SeedWidgetAsync(log, 100);
await SeedCustomerAsync(log, 10000); await SeedCustomerAsync(log, 10000);
@@ -557,23 +557,23 @@ namespace AyaNova.Util
KnownUserTags.Add("test-role-user"); KnownUserTags.Add("test-role-user");
//TEST USERS //TEST USERS
//one of each role type //one of each role type
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminLimited, UserType.NotService, "BizAdminLimited", "BizAdminLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminRestricted, UserType.NotService, "BizAdminRestricted", "BizAdminRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminFull, UserType.NotService, "BizAdminFull", "BizAdminFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.BizAdmin, UserType.NotService, "BizAdmin", "BizAdmin", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.DispatchLimited, UserType.NotService, "DispatchLimited", "DispatchLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.ServiceRestricted, UserType.NotService, "ServiceRestricted", "ServiceRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.DispatchFull, UserType.NotService, "DispatchFull", "DispatchFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.Service, UserType.NotService, "Service", "Service", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.InventoryLimited, UserType.NotService, "InventoryLimited", "InventoryLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.InventoryRestricted, UserType.NotService, "InventoryRestricted", "InventoryRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.InventoryFull, UserType.NotService, "InventoryFull", "InventoryFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.Inventory, UserType.NotService, "Inventory", "Inventory", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.AccountingFull, UserType.NotService, "Accounting", "Accounting", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.Accounting, UserType.NotService, "Accounting", "Accounting", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.TechLimited, UserType.Service, "TechLimited", "TechLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.TechRestricted, UserType.Service, "TechRestricted", "TechRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.TechFull, UserType.Service, "TechFull", "TechFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.Tech, UserType.Service, "Tech", "Tech", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.SalesLimited, UserType.NotService, "SalesLimited", "SalesLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.SalesRestricted, UserType.NotService, "SalesRestricted", "SalesRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.SalesFull, UserType.NotService, "SalesFull", "SalesFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.Sales, UserType.NotService, "Sales", "Sales", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, "OpsAdminLimited", "OpsAdminLimited", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminRestricted, UserType.NotService, "OpsAdminRestricted", "OpsAdminRestricted", KnownUserTags);
await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminFull, UserType.NotService, "OpsAdminFull", "OpsAdminFull", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdmin, UserType.NotService, "OpsAdmin", "OpsAdmin", KnownUserTags);
@@ -584,10 +584,10 @@ namespace AyaNova.Util
#if(DEBUG) #if(DEBUG)
//PRIVACY TEST USER - this is used for a test to see if user info leaks into the logs //PRIVACY TEST USER - this is used for a test to see if user info leaks into the logs
await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, "TEST_PRIVACY_USER_ACCOUNT", "TEST_PRIVACY_USER_ACCOUNT", KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminRestricted, 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 //TEST NOT ACTIVE - this is used for a test to see if inactive user can login
await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, false, "TEST_INACTIVE", "TEST_INACTIVE", 0, KnownUserTags); await SeedUserAsync(log, 1, AuthorizationRoles.OpsAdminRestricted, UserType.NotService, false, "TEST_INACTIVE", "TEST_INACTIVE", 0, KnownUserTags);
#endif #endif
@@ -753,7 +753,7 @@ namespace AyaNova.Util
throw new System.Exception(err); throw new System.Exception(err);
} }
//Known HO type user //Known HO type user
await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.HeadOffice, true, "HeadOffice", "HeadOffice", 0, KnownUserTags, null, null, NewObject.Id); await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.HeadOffice, true, "HeadOffice", "HeadOffice", 0, KnownUserTags, null, null, NewObject.Id);
HeadOfficeIdForCustomer = NewObject.Id; HeadOfficeIdForCustomer = NewObject.Id;
} }
@@ -796,8 +796,8 @@ namespace AyaNova.Util
throw new System.Exception(err); throw new System.Exception(err);
} }
//Known customer type users //Known customer type users
await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, true, "CustomerFull", "CustomerFull", 0, KnownUserTags, null, NewObject.Id, null); await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.Customer, true, "Customer", "Customer", 0, KnownUserTags, null, NewObject.Id, null);
await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, true, "CustomerLimited", "CustomerLimited", 0, KnownUserTags, null, NewObject.Id, null); await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.Customer, true, "CustomerRestricted", "CustomerRestricted", 0, KnownUserTags, null, NewObject.Id, null);
} }
} }
@@ -845,8 +845,8 @@ namespace AyaNova.Util
VendorIdForSubContractorUser = NewObject.Id; VendorIdForSubContractorUser = NewObject.Id;
} }
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorLimited, UserType.ServiceContractor, true, "SubContractorLimited", "SubContractorLimited", 0, KnownUserTags, VendorIdForSubContractorUser, null, null); await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor, true, "SubContractorRestricted", "SubContractorRestricted", 0, KnownUserTags, VendorIdForSubContractorUser, null, null);
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorFull, UserType.ServiceContractor, true, "SubContractorFull", "SubContractorFull", 0, KnownUserTags, VendorIdForSubContractorUser, null, null); await SeedUserAsync(log, 1, AuthorizationRoles.SubContractor, UserType.ServiceContractor, true, "SubContractor", "SubContractor", 0, KnownUserTags, VendorIdForSubContractorUser, null, null);
} }
@@ -890,7 +890,7 @@ namespace AyaNova.Util
stat.Completed = false; stat.Completed = false;
stat.Locked = true; stat.Locked = true;
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles; stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
stat.RemoveRoles = AuthorizationRoles.DispatchFull | AuthorizationRoles.BizAdminFull; stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
stat.Notes = "Use to lock workorder and wait for approval from manager"; stat.Notes = "Use to lock workorder and wait for approval from manager";
using (AyContext ct = ServiceProviderProvider.DBContext) using (AyContext ct = ServiceProviderProvider.DBContext)
{ {
@@ -962,7 +962,7 @@ namespace AyaNova.Util
stat.Completed = true; stat.Completed = true;
stat.Locked = true; stat.Locked = true;
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles; stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
stat.RemoveRoles = AuthorizationRoles.DispatchFull | AuthorizationRoles.BizAdminFull; stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
using (AyContext ct = ServiceProviderProvider.DBContext) using (AyContext ct = ServiceProviderProvider.DBContext)
{ {
@@ -1055,7 +1055,7 @@ namespace AyaNova.Util
stat.Completed = false; stat.Completed = false;
stat.Locked = true; stat.Locked = true;
stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles; stat.SelectRoles = AuthorizationRoles.AllInsideUserRoles;
stat.RemoveRoles = AuthorizationRoles.SalesFull | AuthorizationRoles.AccountingFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.BizAdminFull; stat.RemoveRoles = AuthorizationRoles.Sales | AuthorizationRoles.Accounting | AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
using (AyContext ct = ServiceProviderProvider.DBContext) using (AyContext ct = ServiceProviderProvider.DBContext)
{ {
WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct); WorkOrderStatusBiz biz = WorkOrderStatusBiz.GetBiz(ct);
@@ -1077,8 +1077,8 @@ namespace AyaNova.Util
stat.Color = "#f2f2f2"; stat.Color = "#f2f2f2";
stat.Completed = true; stat.Completed = true;
stat.Locked = true; stat.Locked = true;
stat.SelectRoles = AuthorizationRoles.DispatchFull | AuthorizationRoles.BizAdminFull; stat.SelectRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
stat.RemoveRoles = AuthorizationRoles.DispatchFull | AuthorizationRoles.BizAdminFull; stat.RemoveRoles = AuthorizationRoles.Service | AuthorizationRoles.BizAdmin;
using (AyContext ct = ServiceProviderProvider.DBContext) using (AyContext ct = ServiceProviderProvider.DBContext)
{ {
@@ -1686,7 +1686,7 @@ namespace AyaNova.Util
//Customer contacts //Customer contacts
//10% chance (0-9) //10% chance (0-9)
if (Fake.Random.Number(9) == 4) if (Fake.Random.Number(9) == 4)
await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, true, null, null, 0, null, null, NewObject.Id, null); await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.Customer, true, null, null, 0, null, null, NewObject.Id, null);
} }
} }
} }
@@ -1748,7 +1748,7 @@ namespace AyaNova.Util
throw new System.Exception(err); throw new System.Exception(err);
} }
//HeadOffice contacts //HeadOffice contacts
await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.HeadOffice, true, null, null, 0, null, null, null, NewObject.Id); await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.HeadOffice, true, null, null, 0, null, null, null, NewObject.Id);
//HeadOffice Customer //HeadOffice Customer
await SeedCustomerAsync(log, 2, NewObject.Id); await SeedCustomerAsync(log, 2, NewObject.Id);
@@ -2184,7 +2184,7 @@ namespace AyaNova.Util
o.Tags = RandomTags(); o.Tags = RandomTags();
o.DateRequested = Fake.Date.Between(seedStartWindow, seedEndWindow).ToUniversalTime(); o.DateRequested = Fake.Date.Between(seedStartWindow, seedEndWindow).ToUniversalTime();
o.CustomerId = Fake.Random.Long(1, TotalSeededCustomers); o.CustomerId = Fake.Random.Long(1, TotalSeededCustomers);
o.RequestedByUserId = await SeedUserAsync(log, 1, AuthorizationRoles.CustomerFull, UserType.Customer, true, null, null, 0, null, null, o.CustomerId, null); o.RequestedByUserId = await SeedUserAsync(log, 1, AuthorizationRoles.Customer, UserType.Customer, true, null, null, 0, null, null, o.CustomerId, null);
o.Status = CustomerServiceRequestStatus.Open; o.Status = CustomerServiceRequestStatus.Open;
o.Priority = Fake.Random.Enum<CustomerServiceRequestPriority>(); o.Priority = Fake.Random.Enum<CustomerServiceRequestPriority>();
o.CustomerReferenceNumber = Fake.Finance.Account(); o.CustomerReferenceNumber = Fake.Finance.Account();