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: protected_ref_deploy_key_access.rb
    path of file: ./repos/gitlabhq/app/models/concerns
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module ProtectedRefDeployKeyA
    
  def check_access(current_user, current_project = project)
    super do
      break enabled_deploy_key_for_user?(current_user) if deploy_key?

      yield if block_given?
    end
  end