From e15a6bc1cc3eb9b3670d2b42813c634117e7b04d Mon Sep 17 00:00:00 2001 From: Patrick Derichs Date: Wed, 28 Aug 2019 13:03:24 +0200 Subject: Return NO_ACCESS if user is nil --- app/models/group.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app') diff --git a/app/models/group.rb b/app/models/group.rb index dbec211935d..fac41e6ba44 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -356,6 +356,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 -- cgit v1.2.1