0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00
logto/packages/schemas/src/utils/role.ts
Gao Sun c5da152ddc
refactor: hide internal roles for user tenants
introduce internal roles which name starts with #internal:
with RLS policies to make them read-only.
2023-03-09 00:07:33 +08:00

3 lines
142 B
TypeScript

export const internalRolePrefix = '#internal:';
export const isInternalRole = (roleName: string) => roleName.startsWith(internalRolePrefix);