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
class Scope
attr_reader :name
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