2026-04-20 09:46:13 +00:00
|
|
|
import * as plugins from '../plugins.js';
|
2024-09-29 13:56:38 +02:00
|
|
|
|
2025-12-01 20:03:34 +00:00
|
|
|
/** Standard role types available in all organizations */
|
|
|
|
|
export type TStandardRole = 'owner' | 'admin' | 'editor' | 'guest' | 'viewer' | 'outlaw';
|
|
|
|
|
|
2024-09-29 13:56:38 +02:00
|
|
|
/**
|
2025-12-01 20:03:34 +00:00
|
|
|
* A role describes a user's permissions within an organization.
|
|
|
|
|
* Users can have multiple roles (e.g., ['owner', 'billing-admin']).
|
2024-09-29 13:56:38 +02:00
|
|
|
*/
|
|
|
|
|
export interface IRole {
|
|
|
|
|
id: string;
|
|
|
|
|
data: {
|
|
|
|
|
userId: string;
|
|
|
|
|
organizationId: string;
|
2025-12-01 20:03:34 +00:00
|
|
|
/** Array of roles - supports standard roles and custom role names */
|
|
|
|
|
roles: string[];
|
2024-09-29 13:56:38 +02:00
|
|
|
};
|
|
|
|
|
}
|