Browse Source
A Custom member with only manage_users could set the "manage all collections" child permissions (createNewCollections / editAnyCollection / deleteAnyCollection) on any member, including themselves, via POST /organizations/<org_id>/users/<member_id>. edit_member wrote member_to_edit.access_all unconditionally, so the resulting access_all=true granted full access to every collection's contents - defeating the "manage users without collection access" guarantee. Gate the access_all change on caller_can_manage_collections (Admins/Owners or full-access members), mirroring how put_group preserves a group's access_all for callers without collection rights. For everyone else the member's existing access_all is left untouched. The collection- and group-assignment paths were already gated; this closes the remaining direct path.pull/7397/head
1 changed files with 17 additions and 10 deletions
Loading…
Reference in new issue