Commit 3cf892d6 authored by Sean Arnold's avatar Sean Arnold

Find owner when single user owns a project

parent c1dc6bef
......@@ -87,7 +87,12 @@ module EE
def project_owners_and_participants(rotation, user)
project = rotation.project
owners = project.members.owners.map(&:user).presence || [project.owner] || project.group&.owners
owners = project.members.owners.map(&:user).presence
proj_owner = project.owner if owners.blank?
if project.owner
owners = proj_owner.is_a?(Group) ? proj_owner.owners : [proj_owner]
end
excluding_user = [owners, rotation.participants.map(&:user)].uniq - [user]
......
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