Small tweak for Account-Id or business identifier undefined#3605
Merged
seeker25 merged 3 commits intobcgov:mainfrom Feb 10, 2026
Merged
Small tweak for Account-Id or business identifier undefined#3605seeker25 merged 3 commits intobcgov:mainfrom
seeker25 merged 3 commits intobcgov:mainfrom
Conversation
seeker25
commented
Feb 10, 2026
| org_identifier = kwargs.get("org_id", None) or user_from_context.account_id | ||
| auth = None | ||
| if business_identifier: | ||
| auth = Authorization.get_user_authorizations_for_entity(business_identifier) |
seeker25
commented
Feb 10, 2026
| auth_record = AuthorizationView.find_authorization_for_admin_by_org_id(user_from_context.account_id) | ||
| else: | ||
| auth_record = AuthorizationView.find_user_authorization_by_org_id(user_from_context.sub, org_identifier) | ||
| auth = Authorization(auth_record).as_dict() if auth_record else None |
Collaborator
Author
There was a problem hiding this comment.
auth = None possibly
seeker25
commented
Feb 10, 2026
| auth_record = AuthorizationView.find_user_authorization_by_org_id(user_from_context.sub, org_identifier) | ||
| auth = Authorization(auth_record).as_dict() if auth_record else None | ||
|
|
||
| _check_for_roles(auth.get("orgMembership", None) if auth else None, kwargs) |
Collaborator
Author
There was a problem hiding this comment.
since auth is None, the check_for_roles always fails
role = None
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).