From 010d5ad51b6ad79e9a64d3fc3d4b7ec3ba9cead2 Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 19 Sep 2022 16:40:31 +0200 Subject: [PATCH] chore(nc-gui): rename variable --- packages/nc-gui/composables/useRoles/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/composables/useRoles/index.ts b/packages/nc-gui/composables/useRoles/index.ts index ead8ad2355..1931528a9f 100644 --- a/packages/nc-gui/composables/useRoles/index.ts +++ b/packages/nc-gui/composables/useRoles/index.ts @@ -10,17 +10,17 @@ const [setup, use] = useInjectionState(() => { const projectRoles = ref>({}) const userRoles = computed>(() => { - let userRoles = user.value?.roles ?? {} + let roles = user.value?.roles ?? {} // if string populate key-value paired object - if (isString(userRoles)) { - userRoles = userRoles.split(',').reduce((acc, role) => { + if (isString(roles)) { + roles = roles.split(',').reduce((acc, role) => { acc[role] = true return acc }, {}) } - return userRoles + return roles }) async function loadProjectRoles(projectId: string, isSharedBase: boolean) {