Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: When calling getPermissions api duplicate permissionIds are passed in the payload(#211) #253

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

shanmukhdutt
Copy link
Contributor

Related Issues

Closes #211

Short Description and Why It's Useful

Contribution and Currently Important Rules Acceptance

if (permissionId) serverPermissionsFromRules.push(permissionId);

const removeDuplicatePermissionIds = new Set(serverPermissionsFromRules)
removeDuplicatePermissionIds.add(permissionId);

const serverPermissions = await UserService.getUserPermissions({
permissionIds: serverPermissionsFromRules
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the above code to create set.

Suggested change
permissionIds: serverPermissionsFromRules
permissionIds: [...new Set(serverPermissionsFromRules)]

@ravilodhi ravilodhi merged commit e9ea439 into hotwax:main Feb 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When calling getPermissions api duplicate permissionIds are passed in the payload
3 participants