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

Update userIsInSameOrg to use DB when feature flag enabled #8078

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

emyl3
Copy link
Collaborator

@emyl3 emyl3 commented Aug 27, 2024

BACKEND PULL REQUEST

Related Issue

Changes Proposed

  • Ensure that when calling the userIsInSameOrg permission check we check the DB for the user's org when the feature flag is enabled

Additional Information

  • N/A

Testing

@emyl3 emyl3 force-pushed the elisa/7598-update-permission-check branch 2 times, most recently from ea231cd to 6f4f1a9 Compare August 28, 2024 15:25
@emyl3 emyl3 force-pushed the elisa/7598-update-permission-check branch from 6f4f1a9 to 55536a8 Compare August 28, 2024 15:45
Copy link

sonarcloud bot commented Aug 28, 2024

Optional<Organization> otherOrg =
_oktaRepo
.getOrganizationRoleClaimsForUser(otherUserEmail)
.map(r -> _orgService.getOrganization(r.getOrganizationExternalId()));
if (_featureFlagsConfig.isOktaMigrationEnabled()) {
otherOrg = otherUser.getOrganizations().stream().findFirst();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

⚠️ This assumes that the user will have one org associated with them since it's not possible to be part of more than one org. Let me know if you think this should be more robust.

@emyl3 emyl3 marked this pull request as ready for review August 28, 2024 18:28
Copy link
Collaborator

@fzhao99 fzhao99 left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Collaborator

@mehansen mehansen left a comment

Choose a reason for hiding this comment

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

🚢

@emyl3 emyl3 added this pull request to the merge queue Aug 29, 2024
Merged via the queue into main with commit eb1653b Aug 29, 2024
38 checks passed
@emyl3 emyl3 deleted the elisa/7598-update-permission-check branch August 29, 2024 15:36
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.

3 participants