mirror of
https://github.com/outline/outline.git
synced 2026-11-28 16:19:46 +03:00
Resolves issue where admins could edit documents in collections with 'View Only' permissions when access was granted through 'All Members' permissions, while correctly respecting 'View Only' when permissions were set explicitly on their user account. The bug was in the collection policy logic where admin users were granted full access to non-private collections regardless of the collection's permission level. This created a security vulnerability allowing privilege escalation beyond intended access controls. Changes: - Modified updateDocument, createDocument, deleteDocument, and share permissions in server/policies/collection.ts - Admin bypass now only applies to public collections with ReadWrite default permissions - Explicit membership permissions are now checked first and respected for both private collections and when users have specific permissions - Maintains backward compatibility for legitimate admin access patterns Fixes #10520