Skip to content

Commit

Permalink
Fixed: When calling getPermissions api duplicate permissionIds are pa…
Browse files Browse the repository at this point in the history
…ssed in the payload(#211)
  • Loading branch information
shanmukhdutt committed Jan 17, 2024
1 parent 7b4a40b commit ae74b0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ const actions: ActionTree<UserState, RootState> = {
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
Expand Down

0 comments on commit ae74b0e

Please sign in to comment.