Discourse Meta
如何强制执行权限的最佳方式——控制器还是约束?
开发
pfaffman
(Jay Pfaffman)
2021 年1 月 16 日 13:39
3
我认为权限应该在控制器或约束中强制执行。模型不知道是谁在调用它,我是这么想的。
非常感谢你对此事的思考。
在话题中显示帖子
相关话题
话题
回复
浏览量
活动
Proper place to propose a permissions predicate?
Development
1
137
2025 年2 月 21 日
Guardian before and after checks api
Development
4
344
2024 年7 月 29 日
More detailed response for API /post_actions failures
Development
4
1215
2017 年4 月 25 日
How to add route to root path
Development
3
540
2021 年4 月 8 日
Allow specifiy user different from guardian.user in chat services such as Chat::CreateMessage
Feature
chat
3
693
2023 年12 月 4 日