Repository navigation
fix(sites): require project read permission for private previews - #14936
Conversation
A confirmed organization membership was enough to open a private preview, including a role scoped only to a different project. Co-authored-by: Cursor <[email protected]>
|
Review complete. No issues found — approved ✅. The change replaces the preview-JWT team-membership test with the same fresh-
Reviewed commit: 40832fe |
🟢 Tier S · Ready to mergePrivate site preview authorization now checks the signed-in user’s read access to the target project, rather than accepting any confirmed membership in its organization. The preview-domain E2E test exercises denial for a member scoped to a different project and access after granting the target project’s developer role.
📂 Walkthrough · 2
Reviewed |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Summary
User::getRoles()skips them.testPreviewDomaincovers a confirmed member scoped to another project, then the same member after they receive this project's developer role.Fixes the remaining gap in https://github.com/appwrite/appwrite/security/code-scanning/4297. The unconfirmed-membership check landed earlier in
40495bc019.Test plan
docker compose exec appwrite test tests/e2e/Services/Sites/SitesCustomServerTest.php --filter=testPreviewDomain(1 test, 143 assertions)project-{otherId}-developeris redirected to/auth/previewMade with Cursor