66 lines
2.6 KiB
C#
66 lines
2.6 KiB
C#
using System;
|
|
|
|
namespace AyaNovaQBI
|
|
{
|
|
/// <summary>
|
|
/// Authorization roles
|
|
/// </summary>
|
|
[Flags]
|
|
public enum AuthorizationRoles : int
|
|
{
|
|
//https://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c
|
|
//MAX 31 (2147483647)!!! or will overflow int and needs to be turned into a long
|
|
//Must be a power of two: https://en.wikipedia.org/wiki/Power_of_two
|
|
|
|
///<summary>No role set</summary>
|
|
NoRole = 0,
|
|
///<summary>BizAdminRestricted</summary>
|
|
BizAdminRestricted = 1,
|
|
///<summary>BizAdmin</summary>
|
|
BizAdmin = 2,
|
|
///<summary>ServiceRestricted</summary>
|
|
ServiceRestricted = 4,
|
|
///<summary>Service</summary>
|
|
Service = 8,
|
|
///<summary>InventoryRestricted</summary>
|
|
InventoryRestricted = 16,
|
|
///<summary>Inventory</summary>
|
|
Inventory = 32,
|
|
///<summary>Accounting</summary>
|
|
Accounting = 64,//No limited role, not sure if there is a need
|
|
///<summary>TechRestricted</summary>
|
|
TechRestricted = 128,
|
|
///<summary>Tech</summary>
|
|
Tech = 256,
|
|
///<summary>SubContractorRestricted</summary>
|
|
SubContractorRestricted = 512, //same as tech but restricted by further business rules (more fine grained)
|
|
///<summary>SubContractor</summary>
|
|
SubContractor = 1024,//same as tech limited but restricted by further business rules (more fine grained)
|
|
///<summary>ClientRestricted</summary>
|
|
CustomerRestricted = 2048,
|
|
///<summary>Client</summary>
|
|
Customer = 4096,
|
|
///<summary>OpsAdminRestricted</summary>
|
|
OpsAdminRestricted = 8192,
|
|
///<summary>OpsAdmin</summary>
|
|
OpsAdmin = 16384,
|
|
///<summary>Sales</summary>
|
|
Sales = 32768,
|
|
///<summary>SalesRestricted</summary>
|
|
SalesRestricted = 65536,
|
|
|
|
|
|
///<summary>Anyone of any role</summary>
|
|
All = BizAdminRestricted | BizAdmin | ServiceRestricted | Service | InventoryRestricted |
|
|
Inventory | Accounting | TechRestricted | Tech | SubContractorRestricted |
|
|
SubContractor | CustomerRestricted | Customer | OpsAdminRestricted | OpsAdmin | Sales | SalesRestricted
|
|
|
|
// ,AllInsideUserRoles = BizAdminRestricted | BizAdmin | ServiceRestricted | Service | InventoryRestricted |
|
|
// Inventory | Accounting | TechRestricted | Tech | SubContractorRestricted |
|
|
// SubContractor | Sales | SalesRestricted | OpsAdminRestricted | OpsAdmin
|
|
|
|
|
|
|
|
}//end AuthorizationRoles
|
|
}
|