[openstreetmap/openstreetmap-website] Fix display of suspension message when a user is suspended mid-session (PR #3409)

Andy Allan notifications at github.com
Wed Jan 5 18:25:10 UTC 2022


Without the ability defined, the user is still logged out, but then the `deny_access` check redirects to the login page. The re-login attempt would then fail anyway, with an error message, but let's fix the abilities and use the intended page.

I think this has been broken since the abilities were introduced, since there's no `suspended` action defined in the controller. I was a bit surprised that actions without definitions worked, but it seems that's a legitimate way to do things in Rails!
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3409

-- Commit Summary --

  * Fix display of suspension message when a user is suspended mid-session

-- File Changes --

    M app/abilities/ability.rb (2)
    A test/system/user_suspension_test.rb (15)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3409.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3409.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3409
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/3409 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220105/15c56b4e/attachment.htm>


More information about the rails-dev mailing list