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

Fix multiple chain rights assertions #6725

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

adriansmares
Copy link
Contributor

Summary

This PR fixes another edge case of the AssertRights RPC, specifically the case in which the user has multiple chains of rights towards the entity. This can happen if the user is part of an organization, and the organization is also an entity collaborator, next to the user.

Changes

  • Take the union of rights over all of the entity chains for an individual entity.

Testing

Local testing and unit testing.

Testing steps (as a non admin user):

  1. Create an organization, associated with the user.
  2. Create a gateway, associated with the user.
  3. Add the organization as a collaborator to the gateway.
  4. Check the gateways list in the Console. No error should occur.
Regressions

This fixes a regression caused by the fact that we use the BatchGetGatewayConnectionStats in the Console now. No extra regressions are expected.

Notes for Reviewers

I've gone again through the logic of getRights and I think this was the final difference between single entity rights assertions and batch rights assertions, but please take another sanity check.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • The steps/process to test this feature are clearly explained including testing for regressions.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@adriansmares adriansmares added the bug Something isn't working label Nov 29, 2023
@adriansmares adriansmares added this to the v3.28.2 milestone Nov 29, 2023
@adriansmares adriansmares self-assigned this Nov 29, 2023
@github-actions github-actions bot added the c/identity server This is related to the Identity Server label Nov 29, 2023
@adriansmares adriansmares marked this pull request as ready for review November 29, 2023 08:58
@adriansmares adriansmares requested a review from a team as a code owner November 29, 2023 08:58
Copy link
Member

@KrishnaIyer KrishnaIyer left a comment

Choose a reason for hiding this comment

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

LGTM.

@adriansmares adriansmares force-pushed the fix/is-batch-rights-union branch from f1c62ac to b443b4f Compare November 29, 2023 09:25
@adriansmares adriansmares merged commit 0c60b5a into v3.28 Nov 29, 2023
13 checks passed
@adriansmares adriansmares deleted the fix/is-batch-rights-union branch November 29, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c/identity server This is related to the Identity Server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants