X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/64604a852f941a2c30aef909073b4f6925c622fa..b6700414ae4b038a67cd7c282174834a1b0fa75e:/config/initializers/doorkeeper.rb?ds=inline diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index a96e6fd6c..c1d4e2f78 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require_relative "../../lib/oauth" + Doorkeeper.configure do # Change the ORM that doorkeeper will use (requires ORM extensions installed). # Check the list of supported ORMs here: https://github.com/doorkeeper-gem/doorkeeper#orms @@ -48,7 +50,7 @@ Doorkeeper.configure do # end # end - application_class "Oauth2Application" + application_class "Oauth2Application" unless Settings.status == "database_offline" # Enables polymorphic Resource Owner association for Access Tokens and Access Grants. # By default this option is disabled. @@ -223,7 +225,7 @@ Doorkeeper.configure do # https://doorkeeper.gitbook.io/guides/ruby-on-rails/scopes # default_scopes :public - optional_scopes(*Oauth::SCOPES, *Oauth::PRIVILEGED_SCOPES) + optional_scopes(*Oauth::SCOPES, *Oauth::PRIVILEGED_SCOPES, *Oauth::OAUTH2_SCOPES) # Allows to restrict only certain scopes for grant_type. # By default, all the scopes will be available for all the grant types.