mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user