feat: give full access to ocf admin#341
Open
PavanRaghavendraKulkarni wants to merge 7 commits into
Open
Conversation
…t secure default for unauthorized users
katyalmohit
reviewed
Jul 8, 2026
katyalmohit
approved these changes
Jul 9, 2026
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.
Pull Request
Description
This pull request updates the authentication middleware to bypass organization-based filtering when the authenticated user has OCF Admin privileges (
ocf:adminpermission).Previously, all site-related queries were filtered by the user's HubSpot company ID (
organisation_id_filter), preventing OCF admins from viewing or managing sites across multiple organizations. With this change,get_org_id_from_authdatareturnsNonefor admin users, enabling unfiltered access to all locations.Key Changes
get_org_id_from_authdata(insrc/quartz_api/internal/middleware/auth.py).src/quartz_api/internal/middleware/test_auth.pyto cover:Nonefor admin users.PR
How Has This Been Tested?
Run locally using
uv run pytest src/quartz_api/internal/middleware/test_auth.py(all tests passed).Verified manually using curl request testing.
Yes
Checklist: