refactor(PiecesJustificativesService): stop passing flags, pass user_profile and manage ACL from the service itself

This commit is contained in:
Martin 2024-02-07 17:33:34 +01:00
parent 83690529ca
commit 32e8f34511
16 changed files with 355 additions and 277 deletions

View file

@ -88,10 +88,11 @@ module Users
end
def show
pj_service = PiecesJustificativesService.new(user_profile: current_user)
respond_to do |format|
format.pdf do
@dossier = dossier_with_champs(pj_template: false)
@include_infos_administration = false
@acls = pj_service.acl_for_dossier_export
render(template: 'dossiers/show', formats: [:pdf])
end
format.all do