Scope exported projects to visible_to user

This commit is contained in:
Urban Rotnik 2021-01-19 10:57:30 +01:00
parent ddbc22b274
commit eae3a7fc16

View file

@ -103,7 +103,7 @@ class TeamsController < ApplicationController
if export_projects_params[:project_folder_ids]
folders = @team.project_folders.where(id: export_projects_params[:project_folder_ids])
folders.each do |folder|
@exp_projects += folder.inner_projects
@exp_projects += folder.inner_projects.visible_to(current_user, @team)
end
end