fix(website): show 403 error instead of 404 when editing unowned collection - #1323
Merged
Conversation
…ection Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the collections edit route in the Astro frontend so that authenticated users who try to edit a collection they don’t own receive an explicit 403 Not Authorized response (instead of a 404 redirect), and adds an e2e regression test to lock this behavior in.
Changes:
- Return HTTP 403 (and render a “Not authorized” page state) when a logged-in non-owner visits
collections/<org>/<id>/edit. - Add a Playwright e2e test asserting the 403 status and “Not authorized” heading for non-owners.
- Minor refactor in the edit page render branching to handle the new unauthorized state.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/tests/collections/collectionForm.spec.ts | Adds an e2e test covering the new 403 “Not authorized” behavior for non-owners. |
| website/src/pages/collections/[pathFragment]/[id]/edit.astro | Sets Astro.response.status = 403 for authenticated non-owners and renders an unauthorized page state. |
fengelniederhammer
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.
resolves #1160
Summary
collections/<id>/editfor a collection you don't own previously returned a generic 404 redirect