Skip to content

Commit

Permalink
N'utilise pas de cache_counter dans les abilitations car ce n'est pas…
Browse files Browse the repository at this point in the history
… fiable
  • Loading branch information
etienneCharignon committed Mar 8, 2023
1 parent 64e18e8 commit 77e1f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/ability_utilisateur.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def droit_campagne(compte)
can :create, Campagne
can %i[update read], Campagne, comptes_de_meme_structure(compte) if compte.validation_acceptee?
can %i[update read], Campagne, compte_id: compte.id
can :destroy, Campagne, nombre_evaluations: 0
can(:destroy, Campagne) { |c| Evaluation.where(campagne: c).empty? }
end

def droits_generiques(compte)
Expand Down

0 comments on commit 77e1f2f

Please sign in to comment.