Return NO_ACCESS if user is nil

This commit is contained in:
Patrick Derichs 2019-08-28 12:09:45 +02:00
parent c9b4dc677a
commit 59995d1588
1 changed files with 2 additions and 0 deletions

View File

@ -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