X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6a9ab7cb2d36d87c87d4eace108dcda1433fd073..6c6e8883f703efe8e05d893a94c169ac90733d42:/lib/oauth.rb diff --git a/lib/oauth.rb b/lib/oauth.rb index 8f45a3b4b..6980447f9 100644 --- a/lib/oauth.rb +++ b/lib/oauth.rb @@ -1,5 +1,6 @@ module Oauth SCOPES = %w[read_prefs write_prefs write_diary write_api read_gpx write_gpx write_notes].freeze + PRIVILEGED_SCOPES = %w[].freeze class Scope attr_reader :name @@ -13,7 +14,9 @@ module Oauth end end - def self.scopes - SCOPES.collect { |s| Scope.new(s) } + def self.scopes(privileged: false) + scopes = SCOPES + scopes += PRIVILEGED_SCOPES if privileged + scopes.collect { |s| Scope.new(s) } end end