mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-11 13:28:57 +00:00
7eff417d83
handleSetMemberCollectionAccess gated only on requireRole(r, "owner"), with no validation of the caller's own visibility. member_collection_access has no role exclusion (BUG-1920), so a workspace-role owner independently restricted via collection_access="specific" could PATCH themselves (or any other member) to mode="all", or grant a collection outside their own visible set — defeating the entire BUG-1917/1918/1920/1921 visibility family plus the BUG-1922 export gate in one authenticated request. requireCallerCanSetCollectionAccess now denies a restricted caller from setting mode="all" for any target, and validates every requested collection ID against the caller's own visible set, narrowed to guestResourceFilter's fullCollIDs (mirroring requireCollectionFullyVisible, BUG-1920 codex R2) so an item-level grant can't be escalated into collection-wide access. Unrestricted callers are unaffected.