From 02195ec106ebaec9a1fae26253e45308b3284845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Charignon?= Date: Thu, 31 Aug 2023 14:23:05 +0200 Subject: [PATCH] =?UTF-8?q?ne=20donne=20pas=20le=20droit=20en=20lecture=20?= =?UTF-8?q?sur=20les=20=C3=A9valuations=20aux=20comptes=20sans=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/ability_utilisateur.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability_utilisateur.rb b/app/models/ability_utilisateur.rb index 7da5eff8e..32d8b8159 100644 --- a/app/models/ability_utilisateur.rb +++ b/app/models/ability_utilisateur.rb @@ -35,7 +35,7 @@ def droits_generiques(compte) def droit_evaluation(compte) cannot %i[create], Evaluation can %i[read destroy], Evaluation, campagne: { compte_id: compte.id } - return unless compte.validation_acceptee? + return unless compte.validation_acceptee? && compte.structure_id.present? can %i[read mise_en_action supprimer_responsable_suivi ajouter_responsable_suivi renseigner_qualification],