Skip to content

Do not allow last human owner to leave group

Thong Kuah requested to merge fix_last_non_project_bot_owner into master

What does this MR do and why?

Fixes #363387 (closed)

Exclude project_bot owners when checking if there is only one last owner for a group.

Also DRY up common logic for LastGroupOwnerAssigner. This was causing the UI to show button to be able to leave group when the backend does not allow it.

Screenshots or screen recordings

Before After
Screen_Shot_2022-06-01_at_4.21.01_PM Screen_Shot_2022-06-01_at_4.57.46_PM

How to set up and validate locally

See #363387 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thong Kuah

Merge request reports