From 350ddff100317f57e7568287f744af47ef855e7c Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 17 Jan 2024 16:29:03 +0530 Subject: [PATCH] Implemented suggested changes --- src/store/modules/user/actions.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 66a1af0e..381a0620 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -31,12 +31,10 @@ const actions: ActionTree = { const permissionId = process.env.VUE_APP_PERMISSION_ID; // Prepare permissions list const serverPermissionsFromRules = getServerPermissionsFromRules(); - - const removeDuplicatePermissionIds = new Set(serverPermissionsFromRules) - removeDuplicatePermissionIds.add(permissionId); + if (permissionId) serverPermissionsFromRules.push(permissionId); const serverPermissions = await UserService.getUserPermissions({ - permissionIds: serverPermissionsFromRules + permissionIds: [...new Set(serverPermissionsFromRules)] }, token); const appPermissions = prepareAppPermissions(serverPermissions);