Commit 59995d15 authored by Patrick Derichs's avatar Patrick Derichs

Return NO_ACCESS if user is nil

parent c9b4dc67
...@@ -365,6 +365,8 @@ class Group < Namespace ...@@ -365,6 +365,8 @@ class Group < Namespace
end end
def max_member_access_for_user(user) def max_member_access_for_user(user)
return GroupMember::NO_ACCESS unless user
return GroupMember::OWNER if user.admin? return GroupMember::OWNER if user.admin?
members_with_parents members_with_parents
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment