Skip to content

Commit

Permalink
Implemented suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmukhdutt committed Jan 17, 2024
1 parent ae74b0e commit 350ddff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ const actions: ActionTree<UserState, RootState> = {
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);

Expand Down

0 comments on commit 350ddff

Please sign in to comment.