Skip to content

Declare access levels on the REST delete guards - #117

Merged
manthey merged 1 commit into
mainfrom
access-decorators
Oct 29, 2026
Merged

manthey merged 1 commit into
mainfrom
access-decorators

Conversation

@manthey

@manthey manthey commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Decorate the guards with access.user, matching the routes they guard; the routes still enforce per-resource access and token scopes. The existing guard tests ran as the first-created user, who is a site admin, so add a test that deletes as a non-admin.

Decorate the guards with access.user, matching the routes they guard;
the routes still enforce per-resource access and token scopes.  The
existing guard tests ran as the first-created user, who is a site admin,
so add a test that deletes as a non-admin.
@manthey

manthey commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

The symptom was that a user couldn't delete through the resources endpoint.

@manthey
manthey requested a review from PaulHax October 28, 2026 22:47

@PaulHax PaulHax left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice and simple, thank you.

@manthey
manthey merged commit 0b6979e into main Oct 29, 2026
3 checks passed
@manthey
manthey deleted the access-decorators branch October 29, 2026 12:37
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