mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
Merge pull request #5079 from logto-io/gao-add-enums
This commit is contained in:
commit
a066e360f8
2 changed files with 34 additions and 2 deletions
5
.changeset/brave-hounds-clean.md
Normal file
5
.changeset/brave-hounds-clean.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@logto/schemas": minor
|
||||
---
|
||||
|
||||
add tenant role enum and scope enum
|
|
@ -1,8 +1,35 @@
|
|||
export enum TenantTag {
|
||||
/* Development tenants are free to use but are not meant to be used as production environment */
|
||||
/* Development tenants are free to use but are not meant to be used as production environment. */
|
||||
Development = 'development',
|
||||
/* @deprecated */
|
||||
Staging = 'staging',
|
||||
/* A production tenant must have an associated subscription plan, even if it's a free plan */
|
||||
/* A production tenant must have an associated subscription plan, even if it's a free plan. */
|
||||
Production = 'production',
|
||||
}
|
||||
|
||||
/** Tenant roles that are used in organization template of admin tenant. */
|
||||
export enum TenantRole {
|
||||
/* A tenant admin can manage all resources in the tenant. */
|
||||
Admin = 'admin',
|
||||
/* A tenant member can manage resources without deleting them. */
|
||||
Member = 'member',
|
||||
}
|
||||
|
||||
/** Tenant scopes that are used in organization template of admin tenant. */
|
||||
export enum TenantScope {
|
||||
/** Read tenant data. */
|
||||
ReadTenant = 'read:tenant',
|
||||
/** Create or update tenant data. */
|
||||
WriteTenant = 'write:tenant',
|
||||
/** Delete tenant data. */
|
||||
DeleteTenant = 'delete:tenant',
|
||||
/** Invite a new member to the tenant. */
|
||||
InviteMember = 'invite:member',
|
||||
/** Remove a member from the tenant. */
|
||||
RemoveMember = 'remove:member',
|
||||
/** Update a member's role in the tenant. */
|
||||
UpdateMemberRole = 'update:member:role',
|
||||
}
|
||||
|
||||
/** The prefix that applies to all organization IDs that are created to represent a tenant. */
|
||||
export const tenantOrganizationIdPrefix = 't-';
|
||||
|
|
Loading…
Reference in a new issue