From: Tom Hughes Date: Wed, 8 Jun 2022 12:28:07 +0000 (+0100) Subject: Rename id_oauth_application to id_application in settings X-Git-Tag: live~1689 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/16210d9f4f952bdd72a7b2d75c2c01a7a67d05f1 Rename id_oauth_application to id_application in settings --- diff --git a/CONFIGURE.md b/CONFIGURE.md index ed06ff3e5..fdaea0e83 100644 --- a/CONFIGURE.md +++ b/CONFIGURE.md @@ -73,7 +73,7 @@ For iD, do the following: * 'Modify notes' * On the next page, copy the "Client ID" * Edit config/settings.local.yml in your rails tree -* Add the "id_oauth_application" configuration with the "Client ID" as the value +* Add the "id_application" configuration with the "Client ID" as the value * Restart your rails server An example excerpt from settings.local.yml: @@ -82,7 +82,7 @@ An example excerpt from settings.local.yml: # Default editor default_editor: "id" # OAuth 2 Client ID for iD -id_oauth_application: "Snv…OA0" +id_application: "Snv…OA0" ``` To allow [Notes](https://wiki.openstreetmap.org/wiki/Notes) and changeset discussions to work, follow a similar process, this time registering an OAuth 2 application for the web site: diff --git a/app/views/site/_id.html.erb b/app/views/site/_id.html.erb index 4f764860e..c0ea3631b 100644 --- a/app/views/site/_id.html.erb +++ b/app/views/site/_id.html.erb @@ -1,7 +1,7 @@ <%= javascript_include_tag "edit/id" %>
- <% data = { :configured => Settings.key?(:id_oauth_application) } + <% data = { :configured => Settings.key?(:id_application) } data[:lat] = @lat if @lat data[:lon] = @lon if @lon data[:gpx] = trace_data_url(params[:gpx], :format => :xml) if params[:gpx] diff --git a/app/views/site/id.html.erb b/app/views/site/id.html.erb index 63792ab5a..64cb4fd58 100644 --- a/app/views/site/id.html.erb +++ b/app/views/site/id.html.erb @@ -9,8 +9,8 @@ <% data = {} - if Settings.key?(:id_oauth_application) - token = current_user.oauth_token(Settings.id_oauth_application) + if Settings.key?(:id_application) + token = current_user.oauth_token(Settings.id_application) data[:token] = token.token end data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s diff --git a/config/settings.yml b/config/settings.yml index 44e3cb701..e8db6f818 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -81,8 +81,8 @@ nominatim_url: "https://nominatim.openstreetmap.org/" default_editor: "id" # OAuth application for the web site #oauth_application: "" -# OAuth consumer key for iD -#id_oauth_application: "" +# OAuth application for iD +#id_application: "" # Imagery to return in capabilities as blacklisted imagery_blacklist: # Current Google imagery URLs have google or googleapis in the domain