Commit 9e45a971 authored by Drew Blessing's avatar Drew Blessing

Prevent stale data in LDAP group sync last owner check

parent f1326cd1
......@@ -3,6 +3,9 @@ Please view this file on the master branch, on stable branches it's out of date.
v 8.10.0 (unreleased)
- Rename Git Hooks to Push Rules
v 8.9.5
- Prevent stale data in LDAP group sync last owner check.
v 8.9.4
- Improve how File Lock feature works with nested items. !497
......
......@@ -304,6 +304,11 @@ module Gitlab
next
end
# Since we're removing users in this loop, `group.reload`
# before checking `last_owner?` to prevent stale owner information.
# Without a reload, this check would return a false negative.
group.reload
# Check and update the access level. If `desired_access` is `nil`
# we need to delete the user from the group.
if desired_access.present?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment