Created
February 13, 2024 13:08
-
-
Save ykshinde21/13a0d17e58482f6d0252f86160af906c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum FgaObjects { | |
Account = 'account', | |
Customer = 'customer', | |
Farm = 'farm', | |
Field = 'field', | |
Group = 'group', | |
Org = 'org', | |
User = 'user', | |
} | |
export enum FgaRelations { | |
CanAccess = 'can_access', | |
LinkedAccount = 'linked_account', | |
LinkedBranch = 'linked_branch', | |
Manager = 'manager', | |
Member = 'member', | |
Parent = 'parent', | |
PaymentWriter = 'payment_writer', | |
ReportReader = 'report_reader', | |
SalesReader = 'sales_reader', | |
SalesWriter = 'sales_writer', | |
} | |
export enum FgaGroups { | |
UserAdmin = 'user-admin', | |
UserReport = 'user-report', | |
UserBranchBlocking = 'user-block-branch', | |
} | |
export const FgaOrgPrefix = `${FgaObjects.Org}:`; | |
export const FgaOrgCorporatePrefix = `${FgaObjects.Org}:corp`; | |
export const FgaOrgRegionPrefix = `${FgaObjects.Org}:region-`; | |
export const FgaOrgDivisionPrefix = `${FgaObjects.Org}:division-`; | |
export const FgaOrgBranchPrefix = `${FgaObjects.Org}:branch-`; | |
export const FgaUserPrefix = `${FgaObjects.User}:`; | |
export const FgaGroupPrefix = `${FgaObjects.Group}:`; | |
export const FgaAccountPrefix = `${FgaObjects.Account}:`; | |
export const FgaCustomerPrefix = `${FgaObjects.Customer}:`; | |
export const FgaFarmPrefix = `${FgaObjects.Farm}:`; | |
export const FgaFieldPrefix = `${FgaObjects.Field}:`; | |
export const FgaGroupUserAdmin = `${FgaGroupPrefix}user-admin`; | |
export const FgaGroupUserReporting = `${FgaGroupPrefix}user-report`; | |
export const FgaGroupUserBranchBlocking = `${FgaGroupPrefix}user-block-branch`; | |
export const FgaLegacyBlockedGroupPrefix = `${FgaGroupPrefix}legacy-blocked`; | |
export const FgaLegacyBlockedBranchPrefix = `${FgaUserPrefix}legacy-branch-`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment