From 4a1023a5d82f6e9cf89e86496ca2090fff95509a Mon Sep 17 00:00:00 2001 From: nayeongkim Date: Mon, 2 Sep 2024 11:28:02 +0900 Subject: [PATCH 1/3] feat: revert role info Signed-off-by: NaYeong,Kim --- apps/web/src/schema/identity/token/model.ts | 1 - apps/web/src/store/modules/user/actions.ts | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/web/src/schema/identity/token/model.ts b/apps/web/src/schema/identity/token/model.ts index 6b5b57f1bb..3134eb2670 100644 --- a/apps/web/src/schema/identity/token/model.ts +++ b/apps/web/src/schema/identity/token/model.ts @@ -12,5 +12,4 @@ export interface TokenGrantModel { role_id: string; domain_id: string; workspace_id: string; - page_access: string[]; } diff --git a/apps/web/src/store/modules/user/actions.ts b/apps/web/src/store/modules/user/actions.ts index a5b263f6fe..c150a35f8f 100644 --- a/apps/web/src/store/modules/user/actions.ts +++ b/apps/web/src/store/modules/user/actions.ts @@ -129,12 +129,7 @@ export const grantRoleAndLoadReferenceData: Action = async ({ co }; commit('setCurrentGrantInfo', grantInfo); - const grantRoleInfo = await getGrantedRole(response.role_id, currentRoleType, response.role_type); - const roleInfo = { - roleId: grantRoleInfo ? grantRoleInfo?.roleId : response.role_id, - roleType: grantRoleInfo ? grantRoleInfo?.roleType : response.role_type, - pageAccess: response.page_access || grantRoleInfo?.pageAccess, - }; + const roleInfo = await getGrantedRole(response.role_id, currentRoleType, response.role_type); commit('setCurrentRoleInfo', roleInfo); if (grantRequest.scope === 'DOMAIN') { From 754c64ee536ef8d96312cca34676c0f784a700fa Mon Sep 17 00:00:00 2001 From: nayeongkim Date: Mon, 2 Sep 2024 15:42:10 +0900 Subject: [PATCH 2/3] feat: apply page access permission at workspace group page Signed-off-by: NaYeong,Kim --- .../components/WorkspaceGroupHeader.vue | 12 ++++- .../components/WorkspaceGroupTabGroupUser.vue | 45 ++++++++++++++---- .../components/WorkspaceGroupTabWorkspace.vue | 47 ++++++++++++++----- .../components/WorkspaceGroupTable.vue | 7 ++- .../pages/admin/AdminWorkspaceGroupPage.vue | 25 +++++++++- 5 files changed, 110 insertions(+), 26 deletions(-) diff --git a/apps/web/src/services/advanced/components/WorkspaceGroupHeader.vue b/apps/web/src/services/advanced/components/WorkspaceGroupHeader.vue index 75b0640bd5..5112d4cf06 100644 --- a/apps/web/src/services/advanced/components/WorkspaceGroupHeader.vue +++ b/apps/web/src/services/advanced/components/WorkspaceGroupHeader.vue @@ -6,6 +6,14 @@ import { i18n } from '@/translations'; import { WORKSPACE_GROUP_MODAL_TYPE } from '@/services/advanced/constants/workspace-group-constant'; import { useWorkspaceGroupPageStore } from '@/services/advanced/store/workspace-group-page-store'; +interface Props { + hasReadWriteAccess: boolean +} + +const props = withDefaults(defineProps(), { + hasReadWriteAccess: true, +}); + const workspaceGroupPageStore = useWorkspaceGroupPageStore(); const workspaceGroupState = workspaceGroupPageStore.state; @@ -25,7 +33,9 @@ const handleCreateButtonClick = () => { use-total-count :total-count="workspaceGroupState.totalCount" > -