chore(core): Build in project roles descriptions update (#20421)

This commit is contained in:
Andreas Fitzek 2025-10-07 10:22:36 +02:00 committed by GitHub
parent a2aca5e7a4
commit cfaf1270ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,6 +27,21 @@ const ROLE_NAMES: Record<AllRoleTypes, string> = {
'workflow:editor': 'Workflow Editor',
};
const ROLE_DESCRIPTIONS: Record<AllRoleTypes, string> = {
'global:owner': 'Owner',
'global:admin': 'Admin',
'global:member': 'Member',
[PROJECT_OWNER_ROLE_SLUG]: 'Project Owner',
[PROJECT_ADMIN_ROLE_SLUG]:
'Full control of settings, members, workflows, credentials and executions',
[PROJECT_EDITOR_ROLE_SLUG]: 'Create, edit, and delete workflows, credentials, and executions',
[PROJECT_VIEWER_ROLE_SLUG]: 'Read-only access to workflows, credentials, and executions',
'credential:user': 'Credential User',
'credential:owner': 'Credential Owner',
'workflow:owner': 'Workflow Owner',
'workflow:editor': 'Workflow Editor',
};
const mapToRoleObject = <T extends keyof typeof ROLE_NAMES>(
roles: Record<T, Scope[]>,
roleType: 'global' | 'project' | 'credential' | 'workflow',
@ -35,7 +50,7 @@ const mapToRoleObject = <T extends keyof typeof ROLE_NAMES>(
slug: role,
displayName: ROLE_NAMES[role],
scopes: getRoleScopes(role),
description: ROLE_NAMES[role],
description: ROLE_DESCRIPTIONS[role],
licensed: false,
systemRole: true,
roleType,