X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/daa254351106c4d2c1bef08a88aa946dec6f6411..1b9b67fa8f592a76bb3f69a96a5365983f962f44:/lib/oauth.rb diff --git a/lib/oauth.rb b/lib/oauth.rb index 88db38eb4..679c564a6 100644 --- a/lib/oauth.rb +++ b/lib/oauth.rb @@ -1,8 +1,11 @@ module Oauth - SCOPES = %w[read_prefs write_prefs write_diary write_api read_gpx write_gpx write_notes].freeze + SCOPES = %w[ + read_prefs write_prefs write_diary + write_api read_gpx write_gpx write_notes write_redactions + consume_messages send_messages openid + ].freeze PRIVILEGED_SCOPES = %w[read_email skip_authorization].freeze MODERATOR_SCOPES = %w[write_redactions].freeze - OAUTH2_SCOPES = %w[write_redactions openid].freeze class Scope attr_reader :name @@ -16,10 +19,9 @@ module Oauth end end - def self.scopes(oauth2: false, privileged: false) + def self.scopes(privileged: false) scopes = SCOPES scopes += PRIVILEGED_SCOPES if privileged - scopes += OAUTH2_SCOPES if oauth2 scopes.collect { |s| Scope.new(s) } end end