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

This commit is contained in:
Marin Jankovski 2014-01-31 17:06:13 +01:00
parent 9e181d36ea
commit 468c9ce464
1 changed files with 9 additions and 1 deletions

View File

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