add filtering by group in procedure_overview

The weekly overview do not work for instructeurs in procedures with multiples groups ;
they see dossiers that they do not have access to. Now the correct filter is added
This commit is contained in:
clemkeirua 2020-01-15 14:57:40 +01:00
parent 6a7f48e00a
commit 7e15c6a4a4
4 changed files with 34 additions and 13 deletions

View file

@ -76,7 +76,7 @@ class Instructeur < ApplicationRecord
active_procedure_overviews = procedures
.publiees
.map { |procedure| procedure.procedure_overview(start_date) }
.map { |procedure| procedure.procedure_overview(start_date, groupe_instructeurs) }
.filter(&:had_some_activities?)
if active_procedure_overviews.count == 0