Sha256: 171823e9d64034888c0994a629b970b1fd5b4a45e977bd8da11c99fee25e6d52

Contents?: true

Size: 527 Bytes

Versions: 21

Compression:

Stored size: 527 Bytes

Contents

class Sessions::SudosController < ApplicationController
  def new
  end

  def create
    session = Current.session

    <%- if omniauthable? -%>
    if session.user.authenticate(params[:password]) || session.user.provider
    <%- else -%>
    if session.user.authenticate(params[:password])
    <%- end -%>
      session.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

21 entries across 21 versions & 1 rubygems

Version Path
authentication-zero-2.16.1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.16.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.9 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.8 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.7 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.6 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.5 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.4 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.3 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.2 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.15.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.14.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.13.0 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.6 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.5 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.4 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.3 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.2 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt
authentication-zero-2.12.1 lib/generators/authentication/templates/controllers/html/sessions/sudos_controller.rb.tt