[openstreetmap/openstreetmap-website] Require terms agreement for api write abilities and capabilities (#2096)

Andy Allan notifications at github.com
Wed Jan 2 16:49:02 UTC 2019


I spotted a flaw in my refactoring in 8f70fb21146b1e8b90125e02d54e70bceea1d5fd , since it omitted the check for terms agreement that was previously a side effect of the `require_allow_write_api` method. This PR ensures that api-write-related abilities (and token capabilities) are only granted if the user has agreed to the terms.

There's still a small behaviour change, since the user is not informed precisely why they are denied access, but I don't think it's worth the effort of trying to resolve this.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Require terms agreement for abilities and capabilities related to api write methods

-- File Changes --

    M app/abilities/ability.rb (5)
    M app/abilities/capability.rb (5)
    M test/controllers/changeset_comments_controller_test.rb (69)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2096.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2096.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/2096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190102/ace218db/attachment.html>


More information about the rails-dev mailing list