Class: Spree::LegacyAdminUser
- Inherits:
-
Object
- Object
- Spree::LegacyAdminUser
- Includes:
- AdminUserMethods
- Defined in:
- app/models/spree/legacy_admin_user.rb
Constant Summary
Constants included from PrefixedId
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
-
#valid_password?(check_password) ⇒ Boolean
Simple password validation for testing purposes In production, Spree.admin_user_class should be overridden with a proper auth solution (e.g., Devise).
Methods included from AdminUserMethods
Methods included from PrefixedId
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
11 12 13 |
# File 'app/models/spree/legacy_admin_user.rb', line 11 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
11 12 13 |
# File 'app/models/spree/legacy_admin_user.rb', line 11 def password_confirmation @password_confirmation end |
Instance Method Details
#valid_password?(check_password) ⇒ Boolean
Simple password validation for testing purposes In production, Spree.admin_user_class should be overridden with a proper auth solution (e.g., Devise)
19 20 21 22 23 |
# File 'app/models/spree/legacy_admin_user.rb', line 19 def valid_password?(check_password) return false if encrypted_password.blank? BCrypt::Password.new(encrypted_password) == check_password end |