You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: authorizations_controller.rb
    path of file: ./repos/gitlabhq/app/controllers/oauth
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
  
    
  def downgrade_scopes!
    auth_type = params.delete('gl_auth_type')
    return unless auth_type == 'login'

    ensure_read_user_scope!

    params['scope'] = Gitlab::Auth::READ_USER_SCOPE.to_s if application_has_read_user_scope?
  end