Class: Htpasswd::Acls::ActiveRecord
- Defined in:
- lib/htpasswd/acls/active_record.rb
Instance Method Summary collapse
Methods inherited from Base
[], #authorize_type, #authorized?, #initialize, #pass, register, #type, #user
Constructor Details
This class inherits a constructor from Htpasswd::Acls::Base
Instance Method Details
#authorize_pass(scheme) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/htpasswd/acls/active_record.rb', line 8 def (scheme) obj = active_record.send("find_by_%s" % (@options[:user] || :username), scheme.user) scheme.(obj[@options[:pass] || :password]) rescue raise IncorrectPassword end |
#authorize_user(scheme) ⇒ Object
4 5 6 |
# File 'lib/htpasswd/acls/active_record.rb', line 4 def (scheme) active_record.send("find_by_%s" % (@options[:user] || :username), scheme.user) end |