openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
ApiController#permissions
External apps that use the api are able to query which permissions they have. This currently returns a list of permissions granted to the current user: * if authenticated via OAuth, this list will contain all permissions granted by the user to the access_token. * if authenticated via basic auth all permissions are granted, so the list will contain all permissions. * unauthenticated users have no permissions, so the list will be empty.
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open app/controllers/api_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ApiController-permissions-for-pr
# Commit to gitgit add app/controllers/api_controller.rbgit commit -m "better docs for ApiController#permissions"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ApiController-permissions-for-pr
hub pull-request
# Celebrate!