Skip to content

Fix privilege escalation allowing granted users to delete collections#12

Merged
vitaliimelnychuk merged 2 commits intomainfrom
cursor/critical-bug-inspection-77cf
Apr 8, 2026
Merged

Fix privilege escalation allowing granted users to delete collections#12
vitaliimelnychuk merged 2 commits intomainfrom
cursor/critical-bug-inspection-77cf

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor bot commented Apr 7, 2026

Summary

  • identified a critical authorization regression introduced in recent collection-access changes
  • restricted collection rename/delete permissions to owner and creator only
  • added a regression test for canRenameOrDeleteCollection to ensure grant users cannot perform destructive collection operations
  • adjusted the test to mock Prisma so it runs in CI without DB env setup

Validation

  • npm test -- src/server/access/collections.test.ts
  • npm test

Impact

This prevents granted (shared) users from deleting or renaming entire collections, which could otherwise cause destructive data loss for other users.

Open in Web View Automation 

cursoragent and others added 2 commits April 7, 2026 11:06
@vitaliimelnychuk vitaliimelnychuk marked this pull request as ready for review April 8, 2026 15:27
@vitaliimelnychuk vitaliimelnychuk merged commit 037f03e into main Apr 8, 2026
1 check passed
@devactivity-app
Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 1d 4h 20m Coding Time: 1m Review Time: < 1 min

Achievements

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