# Meilleure façon de faire respecter les autorisations - contrôleur ou contrainte ?

**URL:** <https://meta.discourse.org/t/best-way-to-enforce-permissions-controller-or-constraint/176113>\
**Category:** Development\
**Created:** [Janvier 14, 2021, 5:02 UTC](https://meta.discourse.org/t/best-way-to-enforce-permissions-controller-or-constraint/176113 "2021-01-14T17:02:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [Janvier 16, 2021, 1:10 UTC](https://meta.discourse.org/t/best-way-to-enforce-permissions-controller-or-constraint/176113/2 "2021-01-16T13:10:10Z")

</div>

Ne pouvez-vous pas passer une méthode à `before_action` pour vérifier votre condition ?

---

_[View the full topic](https://meta.discourse.org/t/best-way-to-enforce-permissions-controller-or-constraint/176113)._
