Commit 468c9ce4648462dee9eaf9001d23b925386a4531
1 parent
9e181d36
Exists in
spb-stable
and in
3 other branches
Allow issues to be viewed for authenticated user when project is public or internal.
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
app/services/filtering_service.rb
... | ... | @@ -45,7 +45,11 @@ class FilteringService |
45 | 45 | current_user.send(table_name) |
46 | 46 | when 'all' then |
47 | 47 | if current_user |
48 | - klass.of_projects(current_user.authorized_projects.pluck(:id)) | |
48 | + if project && (project.public? || project.internal?) | |
49 | + klass.of_projects(Project.public_or_internal_only(current_user)) | |
50 | + else | |
51 | + klass.of_projects(current_user.authorized_projects.pluck(:id)) | |
52 | + end | |
49 | 53 | else |
50 | 54 | klass.of_projects(Project.public_only) |
51 | 55 | end |
... | ... | @@ -120,4 +124,8 @@ class FilteringService |
120 | 124 | |
121 | 125 | items |
122 | 126 | end |
127 | + | |
128 | + def project | |
129 | + Project.where(id: params[:project_id]).first if params[:project_id].present? | |
130 | + end | |
123 | 131 | end | ... | ... |