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 - tenant barrier error on contact_info refactor #6316

Merged
merged 3 commits into from
Jun 8, 2023

Conversation

nicholaspcr
Copy link
Contributor

@nicholaspcr nicholaspcr commented Jun 8, 2023

Summary

References #5587

When fetching entities the tenant constraint is always applied via the newSelectModel method, this PR fixes the lack of said method when fetching an user or an ContactInfo entity.

Changes

  • Usage of newSelectModel when performing updates
  • Added test cases to confirm that operations were done in the correct manner.
  • Added an error in case the provided ContactInfo isn't found.
    • This is mostly a redundant check since GetValidation fills the contact info with the information in the ContactInfoValidation fetched from the DB.
    • Nevertheless this is just to have a check instead of leaving the responsibility exclusively to the GetValidation method

Testing

Added more cases to the unit test

Notes for Reviewers

Looked at the other PRs for something similar but couldn't find anything similar to this error on them.

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.
  • 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.

@nicholaspcr nicholaspcr added the technical debt Not necessarily broken, but could be done better/cleaner label Jun 8, 2023
@nicholaspcr nicholaspcr added this to the v3.26.1 milestone Jun 8, 2023
@nicholaspcr nicholaspcr requested a review from adriansmares as a code owner June 8, 2023 13:38
@nicholaspcr nicholaspcr self-assigned this Jun 8, 2023
@github-actions github-actions bot added c/identity server This is related to the Identity Server compat/db This could affect Database compatibility labels Jun 8, 2023
@nicholaspcr nicholaspcr force-pushed the fix/5587-tenant-barrier branch from 3be9136 to cafaeb5 Compare June 8, 2023 13:50
@nicholaspcr nicholaspcr requested a review from adriansmares June 8, 2023 13:58
@nicholaspcr nicholaspcr merged commit e712d41 into v3.26 Jun 8, 2023
@nicholaspcr nicholaspcr deleted the fix/5587-tenant-barrier branch June 8, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/identity server This is related to the Identity Server compat/db This could affect Database compatibility technical debt Not necessarily broken, but could be done better/cleaner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants