diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index d1e31b98..66a1af0e 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -31,7 +31,9 @@ const actions: ActionTree = { const permissionId = process.env.VUE_APP_PERMISSION_ID; // Prepare permissions list const serverPermissionsFromRules = getServerPermissionsFromRules(); - if (permissionId) serverPermissionsFromRules.push(permissionId); + + const removeDuplicatePermissionIds = new Set(serverPermissionsFromRules) + removeDuplicatePermissionIds.add(permissionId); const serverPermissions = await UserService.getUserPermissions({ permissionIds: serverPermissionsFromRules