[openstreetmap/openstreetmap-website] CanCanCan for user blocks and redactions (#2051)
Andy Allan
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:
https://github.com/openstreetmap/openstreetmap-website/pull/2051
-- 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 --
https://github.com/openstreetmap/openstreetmap-website/pull/2051.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2051.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2051
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181107/1dda9ce2/attachment.html>
More information about the rails-dev
mailing list