Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

982 B
Raw Blame
/**
 * RBAC permission identifiers, mirroring the backend `PermissionId` enum
 * (crates/roles_and_permissions/src/domain/model.rs). The user's
 * granted permissions are exposed on the frontend via `usePermissions()` /
 * `useHasPermission()` in `@core/context/user`.
 *
 * Prefer referencing these constants over hardcoding the raw permission strings.
 */
export const PERMISSION_IDS = {
  WRITE_STRIPE_SUBSCRIPTION: 'write:stripe_subscription',
  READ_PROFESSIONAL_FEATURES: 'read:professional_features',
  WRITE_RELEASE_EMAIL: 'write:release_email',
  WRITE_ADMIN_PANEL: 'write:admin_panel',
  WRITE_ENTERPRISE_SUBSCRIPTIONS: 'write:enterprise_subscriptions',
  WRITE_DISCOUNT: 'write:discount',
  WRITE_IT_PANEL: 'write:it_panel',
  WRITE_EMAIL_TOOL: 'write:email_tool',
  WRITE_AI_FEATURES: 'write:ai_features',
  READ_DOCX_EDITOR: 'read:docx_editor',
  WRITE_PROAI: 'write:proai',
} as const;

export type PermissionId = (typeof PERMISSION_IDS)[keyof typeof PERMISSION_IDS];