Rails developers: What's your favorite library for defining and enforcing access control rules?
-
-
Replying to @andrewculver
I’ve always done it by creating LoggedInController / LoggedOutController / AdminController which each descend from the main controller and automatically apply an appropriate filter. The filters are trivial so I have never used a library. (I haven’t done fine grained ACLs though.)
3 replies 1 retweet 7 likes
Replying to @patio11 @andrewculver
Pro-tip that I’m stealing from @tqbf — if you do it this way then you’re forced to declare your dangerous controllers as dangerous (“just grep for all the admin ones”) and can’t blow up the world by forgetting to add a filter on a new controller.
6:58 PM - 27 Sep 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.