Class: Webhookdb::Service::Auth::AdminPasswordStrategy

Inherits:
PasswordStrategy
  • Object
show all
Defined in:
lib/webhookdb/service/auth.rb

Instance Method Summary collapse

Methods inherited from PasswordStrategy

#valid?

Instance Method Details

#authenticate!Object



32
33
34
35
36
37
38
39
# File 'lib/webhookdb/service/auth.rb', line 32

def authenticate!
  return unless (customer = self.lookup_customer)
  unless customer.admin?
    fail!
    return
  end
  success!(customer)
end