Class: Booth::Userland::Webauths::Guards::Sudo

Inherits:
Object
  • Object
show all
Includes:
MethodObject
Defined in:
lib/booth/userland/webauths/guards/sudo.rb

Instance Method Summary collapse

Methods included from MethodObject

included

Instance Method Details

#callObject



11
12
13
14
15
16
17
# File 'lib/booth/userland/webauths/guards/sudo.rb', line 11

def call
  return if credential.mode_first_time?
  return if credential.mode_username_and_password?
  return if credential.mode_username_password_and_otp?

  request.sudo.guard_with_webauth { yield _1 }
end