cartodb/lib/carto/oauth_provider/scopes/dataservices_scope.rb

18 lines
427 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
module Carto
module OauthProvider
module Scopes
class DataservicesScope < DefaultScope
def initialize(service, description)
super('dataservices', service, CATEGORY_MONEY, description)
@grant_key = :services
end
def add_to_api_key_grants(grants, _user = nil)
super(grants)
ensure_includes_apis(grants, ['sql'])
end
end
end
end
end