Skip to content

feat(api/auth): use strawberry/gql permission classes#200

Open
RobertRosca wants to merge 9 commits into
mainfrom
feat/strawberry-permissions
Open

feat(api/auth): use strawberry/gql permission classes#200
RobertRosca wants to merge 9 commits into
mainfrom
feat/strawberry-permissions

Conversation

@RobertRosca
Copy link
Copy Markdown
Member

@RobertRosca RobertRosca commented May 5, 2026

PR updates gql auth/z code to use Strawberry's 'native' permission model (classes inheriting BasePermission, with permission_classes=... on fields) instead of implicit authentication within _ensure_proposal_damnit_path.

Adds IsAuthenticated and IsProposalMember classes, included in @strawberry.field(permission_classes=...) where appropriate.

Makes _ensure_proposal_damnit_path only deal with checking proposal has damnit path (removing auth/z responsibilities) and renames the function to _ensure_damnit_path.

@CammilleCC
Copy link
Copy Markdown
Member

I've quickly rebased and tested it, it seems working nicely 😊 Can you please add a test fora denied path on IsProposalMember permission?

Base automatically changed from feat/refactor-graphql-run-query to main May 8, 2026 13:17
@RobertRosca RobertRosca force-pushed the feat/strawberry-permissions branch from b6b2129 to 6239140 Compare June 1, 2026 07:23
@RobertRosca RobertRosca marked this pull request as ready for review June 1, 2026 07:33
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.

2 participants