Browse Source
Follow-up hardening on the custom-role work, found during a static review: - Admin panel type change (apply_membership_type_change): when converting a Custom member to the legacy Manager role, only preserve `access_all` if the member actually held the full "manage all collections" grant (all three collection flags). Previously an Edit-any-collection-only Custom member (whose access_all is just the Edit mirror) became a Manager with a broad access_all grant, silently escalating Edit-only into Create + Edit + Delete. Mirrors the collection-permissions down-migration. Unit test updated. - Bulk collection access (post_bulk_access_collections): drop the blanket has_full_access() requirement and rely on the existing per-collection is_manageable_by_user check (as the single-collection endpoint and the pre-existing behavior do). Pure manage_users / manage_groups / manage_policies Custom members hold no per-collection manage grant and are still rejected, while a Manager/Custom member who manages some collections regains the ability to bulk-edit exactly those collections. - Group details (GET /organizations/<org>/groups/<id>/details): align the guard with the list endpoint (/groups/details) to ManageUsersOrGroups, so a manage_users member is not denied the single-group view of the same data it can already read in bulk.pull/7397/head
2 changed files with 48 additions and 14 deletions
Loading…
Reference in new issue