mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
chore(core): Move scopes and roles into database in preparation for custom roles (#17226)
This commit is contained in:
@@ -82,11 +82,12 @@ const credentialRoleTranslations = computed<Record<string, string>>(() => {
|
||||
});
|
||||
|
||||
const credentialRoles = computed<AllRolesMap['credential']>(() => {
|
||||
return rolesStore.processedCredentialRoles.map(({ role, scopes, licensed }) => ({
|
||||
return rolesStore.processedCredentialRoles.map(({ role, scopes, licensed, description }) => ({
|
||||
role,
|
||||
name: credentialRoleTranslations.value[role],
|
||||
scopes,
|
||||
licensed,
|
||||
description,
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
@@ -88,8 +88,14 @@ describe('WorkflowShareModal.ee.vue', () => {
|
||||
workflowsEEStore.getWorkflowOwnerName = vi.fn(() => 'Owner Name');
|
||||
projectsStore.personalProjects = [createProjectListItem()];
|
||||
rolesStore.processedWorkflowRoles = [
|
||||
{ name: 'Editor', role: 'workflow:editor', scopes: [], licensed: false },
|
||||
{ name: 'Owner', role: 'workflow:owner', scopes: [], licensed: false },
|
||||
{
|
||||
name: 'Editor',
|
||||
role: 'workflow:editor',
|
||||
scopes: [],
|
||||
licensed: false,
|
||||
description: 'Editor',
|
||||
},
|
||||
{ name: 'Owner', role: 'workflow:owner', scopes: [], licensed: false, description: 'Owner' },
|
||||
];
|
||||
|
||||
workflowSaving = useWorkflowSaving({ router: useRouter() });
|
||||
|
||||
@@ -108,11 +108,12 @@ const workflowRoleTranslations = computed(() => ({
|
||||
}));
|
||||
|
||||
const workflowRoles = computed(() =>
|
||||
rolesStore.processedWorkflowRoles.map(({ role, scopes, licensed }) => ({
|
||||
rolesStore.processedWorkflowRoles.map(({ role, scopes, licensed, description }) => ({
|
||||
role,
|
||||
name: workflowRoleTranslations.value[role],
|
||||
scopes,
|
||||
licensed,
|
||||
description,
|
||||
})),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user