diff options
author | Sean McGivern <sean@gitlab.com> | 2016-08-18 21:32:42 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-08-18 21:32:42 +0100 |
commit | d2cd9d96965722cca06792c63d76d2704366d7a5 (patch) | |
tree | 72ae0ddb05716be67d696cc8bd71bfc1eb7b37d8 /app/services/members | |
parent | 396f85e438ddc9bcd89f5a557980ce82b71e098b (diff) | |
download | gitlab-ce-d2cd9d96965722cca06792c63d76d2704366d7a5.tar.gz |
Ensure last group owner isn't removed on expiry
Diffstat (limited to 'app/services/members')
-rw-r--r-- | app/services/members/authorized_destroy_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/members/authorized_destroy_service.rb b/app/services/members/authorized_destroy_service.rb index c23f90a6a10..ca9db59cac7 100644 --- a/app/services/members/authorized_destroy_service.rb +++ b/app/services/members/authorized_destroy_service.rb @@ -7,6 +7,8 @@ module Members end def execute + return false if member.is_a?(GroupMember) && member.source.last_owner?(member.user) + member.destroy if member.request? && member.user != user |