[openstreetmap/openstreetmap-website] Convert various user attribute tests to use permissions system (#2411)

Andy Allan notifications at github.com
Wed Oct 23 09:28:31 UTC 2019

This replaces various (but not all) uses of `current_user.administrator?` and `current_user.moderator?` to use the permissions system. This is what we would like to see new code follow, as it allows more flexibility for changing abilities in the future. 
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Convert various administator? tests to use cancancan permissions checks
  * Convert various moderator? tests to use cancancan permissions checks

-- File Changes --

    M app/controllers/diary_entries_controller.rb (6)
    M app/views/layouts/_header.html.erb (2)
    M app/views/redactions/show.html.erb (10)
    M app/views/user_blocks/blocks_by.html.erb (2)
    M app/views/user_blocks/blocks_on.html.erb (2)
    M app/views/user_blocks/index.html.erb (2)
    M app/views/user_blocks/show.html.erb (2)
    M app/views/users/show.html.erb (50)

-- 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...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20191023/abfd0471/attachment.html>

More information about the rails-dev mailing list