Commit 468c9ce4 authored by Marin Jankovski's avatar Marin Jankovski

Allow issues to be viewed for authenticated user when project is public or internal.

parent 9e181d36
...@@ -45,7 +45,11 @@ class FilteringService ...@@ -45,7 +45,11 @@ class FilteringService
current_user.send(table_name) current_user.send(table_name)
when 'all' then when 'all' then
if current_user if current_user
klass.of_projects(current_user.authorized_projects.pluck(:id)) if project && (project.public? || project.internal?)
klass.of_projects(Project.public_or_internal_only(current_user))
else
klass.of_projects(current_user.authorized_projects.pluck(:id))
end
else else
klass.of_projects(Project.public_only) klass.of_projects(Project.public_only)
end end
...@@ -120,4 +124,8 @@ class FilteringService ...@@ -120,4 +124,8 @@ class FilteringService
items items
end end
def project
Project.where(id: params[:project_id]).first if params[:project_id].present?
end
end end
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