73322a0e55
Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
21 lines
438 B
Ruby
21 lines
438 B
Ruby
# frozen_string_literal: true
|
|
|
|
module OauthApplications
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
before_action :prepare_scopes, only: [:create, :update]
|
|
end
|
|
|
|
def prepare_scopes
|
|
scopes = params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
|
|
|
|
if scopes
|
|
params[:doorkeeper_application][:scopes] = scopes.join(' ')
|
|
end
|
|
end
|
|
|
|
def load_scopes
|
|
@scopes ||= Doorkeeper.configuration.scopes
|
|
end
|
|
end
|