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

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

Instance Method Summary collapse

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
# File 'lib/booth/userland/webauths/guards/sudo.rb', line 14

def call
  if credential.authenticators.registered_scope.none?
    log { 'You have no registered Authenticators, not requiring sudo of you' }
    return
  end

  log { 'You have registered Authenticators, not requiring sudo of you' }
  request.sudo.guard_with_webauth { yield it }
end