Class: Booth::Userland::Passwords::Sudo

Inherits:
Object
  • Object
show all
Includes:
Concerns::Action
Defined in:
lib/booth/userland/passwords/sudo.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/booth/userland/passwords/sudo.rb', line 7

def call
  request.must_be_post!
  request.must_be_html!
  request.must_be_logged_in!

  do_find_credential
    .on_success { do_require_credential_has_password }
    .on_success { do_check_password }
    .on_success { do_grant_sudo }
end