Skip to content

Make sure that Group.last_owner? returns up-to-date information

Group.last_owner? is used by the LDAP sync process to detect when a user is the last owner and should not be removed or demoted. The new LDAP group sync introduced in 8.7 manipulates several times the group member list using a single instance of the group object, and if last_owner? uses cached information then the result is not up to date and the last owner can be removed from the group.

Merge request reports