feat(API): Add user management endpoints to the Projects Public API (#12329)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Andreas Fitzek <andreas.fitzek@n8n.io>
Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com>
This commit is contained in:
Marc Littlemore
2025-05-30 12:04:38 +01:00
committed by GitHub
parent c229e915ea
commit 4459c7e7b1
25 changed files with 1391 additions and 71 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import type { ProjectRole } from '@n8n/permissions';
import type { ProjectRole, TeamProjectRole } from '@n8n/permissions';
import { computed, ref, watch, onBeforeMount, onMounted, nextTick } from 'vue';
import { useRouter } from 'vue-router';
import { deepCopy } from 'n8n-workflow';
@@ -192,12 +192,15 @@ const updateProject = async () => {
return;
}
try {
if (formData.value.relations.some((r) => r.role === 'project:personalOwner')) {
throw new Error('Invalid role selected for this project.');
}
await projectsStore.updateProject(projectsStore.currentProject.id, {
name: formData.value.name!,
icon: projectIcon.value,
relations: formData.value.relations.map((r: ProjectRelation) => ({
userId: r.id,
role: r.role,
role: r.role as TeamProjectRole,
})),
});
isDirty.value = false;