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: single_use_links_controller.rb
    path of file: ./repos/hyrax/app/controllers/hyrax
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Hyrax
  class SingleUseLinksContr
    
    def deny_link_access(exception)
      if current_user&.persisted?
        redirect_to main_app.root_url, alert: "You do not have sufficient privileges to create links to this document"
      else
        session["user_return_to"] = request.url
        redirect_to new_user_session_url, alert: exception.message
      end
    end