[openstreetmap-website] Implement API endpoint to query permissions. (#45)

Enno Brehm reply+i-4304275-30858777f5277675915162daa28ce32c4a474c62-1419053 at reply.github.com
Thu Apr 26 16:38:19 BST 2012


This commit adds an API endpoint where a api client can query which permissions have been granted. Primary use is to find out what can be done with an access token (since a user can always check off permissions during Oauth authentication/authorization). We suggested this feature on the openstreetmap-dev-list:

http://lists.openstreetmap.org/pipermail/dev/2012-April/024858.html

This feature allows for more user-friendly Oauth client applications as they can e.g. find out whether they can write to the map without actually changing it (thus creating a changeset) and to give feedback to the authenticating user.

Remark: we found 3 failing tests in the original code, which are still failing (test_changes_simple, test_changes_zoom_valid, test_hours_valid).



You can merge this Pull Request by running:

  git pull https://github.com/sozialhelden/openstreetmap-website implement-permissions-api

Or you can view, comment on it, or merge it online at:

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

-- Commit Summary --

* Implement API endpoint to query permissions.

-- File Changes --

M Gemfile (2)
M Gemfile.lock (17)
M app/controllers/api_controller.rb (17)
A app/views/api/permissions.builder (9)
M config/routes.rb (1)
M test/functional/api_controller_test.rb (38)

-- Patch Links --

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

--- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/45



More information about the rails-dev mailing list