summaryrefslogtreecommitdiff
path: root/app/models/group.rb
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-08-28 12:09:45 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-08-28 15:04:23 +0200
commit59995d15886b831f2483dfaa8e0c46372aa76eb0 (patch)
tree1fa8e31ab69cd31910cf7bba7f4509c51ca76309 /app/models/group.rb
parentc9b4dc677abdebc02ecac4dca65a759d3f07b2a0 (diff)
downloadgitlab-ce-59995d15886b831f2483dfaa8e0c46372aa76eb0.tar.gz
Return NO_ACCESS if user is nil
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb2
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