[openstreetmap/openstreetmap-website] CanCanCan for user blocks and redactions (#2051)
notifications at github.com
Wed Nov 7 12:44:53 UTC 2018
This PR refactors user blocks and redactions to use CanCanCan.
This does change the response slightly for forbidden actions, rather than redirecting to :index with a flash message. But I'm happy with the simplification and I doubt anyone will notice the difference.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Migrate UserBlocksController to use CanCanCan
* Use CanCanCan for redaction authorizations
-- File Changes --
M app/abilities/ability.rb (4)
M app/controllers/redactions_controller.rb (5)
M app/controllers/user_blocks_controller.rb (5)
M test/controllers/redactions_controller_test.rb (6)
M test/controllers/user_blocks_controller_test.rb (9)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev