Sha256: a6af1b2758a0e2b31d50674369217d47585c58cdef381f653b901d651c00651b

Contents?: true

Size: 409 Bytes

Versions: 14

Compression:

Stored size: 409 Bytes

Contents

class Sessions::SudosController < ApplicationController
  def new
  end

  def create
    session_record = Current.session

    if session_record.user.authenticate(params[:password])
      session_record.sudo.mark; redirect_to(params[:proceed_to_url])
    else
      redirect_to new_sessions_sudo_path(proceed_to_url: params[:proceed_to_url]), alert: "The password you entered is incorrect"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
authentication-zero-4.0.1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-4.0.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-3.0.2 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-3.0.1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-3.0.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-3.0.0.alpha1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.36 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.35 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.34 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.33 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.32 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.31 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.30 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.29 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt