Browse Source

fix: project role update issue

pull/7342/head
Ramesh Mane 10 months ago
parent
commit
f7c219e231
  1. 6
      packages/nc-gui/components/project/AccessSettings.vue

6
packages/nc-gui/components/project/AccessSettings.vue

@ -85,7 +85,7 @@ const updateCollaborator = async (collab: any, roles: ProjectRoles) => {
WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles && WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles &&
isEeUI) isEeUI)
) { ) {
await removeProjectUser(activeProjectId.value!, collab) await removeProjectUser(activeProjectId.value!, currentCollaborator as any)
if ( if (
currentCollaborator.workspace_roles && currentCollaborator.workspace_roles &&
WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles && WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles &&
@ -97,11 +97,11 @@ const updateCollaborator = async (collab: any, roles: ProjectRoles) => {
} }
} else if (currentCollaborator.base_roles) { } else if (currentCollaborator.base_roles) {
currentCollaborator.roles = roles currentCollaborator.roles = roles
await updateProjectUser(activeProjectId.value!, collab) await updateProjectUser(activeProjectId.value!, currentCollaborator as any)
} else { } else {
currentCollaborator.roles = roles currentCollaborator.roles = roles
currentCollaborator.base_roles = roles currentCollaborator.base_roles = roles
await createProjectUser(activeProjectId.value!, collab) await createProjectUser(activeProjectId.value!, currentCollaborator as any)
} }
} catch (e: any) { } catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e)) message.error(await extractSdkResponseErrorMsg(e))

Loading…
Cancel
Save