diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-08-28 12:09:45 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-08-28 15:04:23 +0200 |
commit | 59995d15886b831f2483dfaa8e0c46372aa76eb0 (patch) | |
tree | 1fa8e31ab69cd31910cf7bba7f4509c51ca76309 /app/models/group.rb | |
parent | c9b4dc677abdebc02ecac4dca65a759d3f07b2a0 (diff) | |
download | gitlab-ce-59995d15886b831f2483dfaa8e0c46372aa76eb0.tar.gz |
Return NO_ACCESS if user is nil
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index 6c868b1d1f0..61a4802a6ee 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -365,6 +365,8 @@ class Group < Namespace end def max_member_access_for_user(user) + return GroupMember::NO_ACCESS unless user + return GroupMember::OWNER if user.admin? members_with_parents |