From 95efae4e78c80f06cf8641f000d8809eb94b6564 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 11 Mar 2023 14:31:16 +0800 Subject: [PATCH] fix(nc-gui): mark it as editor by default --- packages/nc-gui/components/tabs/auth/UserManagement.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nc-gui/components/tabs/auth/UserManagement.vue b/packages/nc-gui/components/tabs/auth/UserManagement.vue index fa73d2f080..48d3540dd2 100644 --- a/packages/nc-gui/components/tabs/auth/UserManagement.vue +++ b/packages/nc-gui/components/tabs/auth/UserManagement.vue @@ -76,6 +76,11 @@ const inviteUser = async (user: User) => { try { if (!project.value?.id) return + if (!user.roles) { + // mark it as editor by default + user.roles = 'editor' + } + await api.auth.projectUserAdd(project.value.id, user) // Successfully added user to project