using System; namespace AyaNovaQBI { /// /// Authorization roles /// [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 ///No role set NoRole = 0, ///BizAdminRestricted BizAdminRestricted = 1, ///BizAdmin BizAdmin = 2, ///ServiceRestricted ServiceRestricted = 4, ///Service Service = 8, ///InventoryRestricted InventoryRestricted = 16, ///Inventory Inventory = 32, ///Accounting Accounting = 64,//No limited role, not sure if there is a need ///TechRestricted TechRestricted = 128, ///Tech Tech = 256, ///SubContractorRestricted SubContractorRestricted = 512, //same as tech but restricted by further business rules (more fine grained) ///SubContractor SubContractor = 1024,//same as tech limited but restricted by further business rules (more fine grained) ///ClientRestricted CustomerRestricted = 2048, ///Client Customer = 4096, ///OpsAdminRestricted OpsAdminRestricted = 8192, ///OpsAdmin OpsAdmin = 16384, ///Sales Sales = 32768, ///SalesRestricted SalesRestricted = 65536, ///Anyone of any role 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 }