Class: User::Operation::Unlock
- Inherits:
-
Trailblazer::Operation
- Object
- Trailblazer::Operation
- User::Operation::Unlock
- Defined in:
- app/concepts/morpho/user/operation/unlock.rb
Instance Method Summary collapse
- #check(options) ⇒ Object
- #find(options) ⇒ Object
- #not_allowed(options) ⇒ Object
- #not_delivered(options) ⇒ Object
- #not_found(options) ⇒ Object
- #not_valid(options) ⇒ Object
- #unlock_token_email(options) ⇒ Object
- #validate(options) ⇒ Object
Instance Method Details
#check(options) ⇒ Object
21 22 23 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 21 def check (, **) ['model'].login_locked? end |
#find(options) ⇒ Object
17 18 19 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 17 def find (, **) ['model'] = Morpho::User.find_by(email: ['data']['email']) end |
#not_allowed(options) ⇒ Object
37 38 39 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 37 def not_allowed (, **) ['error'] = :not_allowed end |
#not_delivered(options) ⇒ Object
41 42 43 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 41 def not_delivered (, **) ['error'] = :not_delivered end |
#not_found(options) ⇒ Object
33 34 35 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 33 def not_found (, **) ['error'] = :not_found end |
#not_valid(options) ⇒ Object
29 30 31 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 29 def not_valid (, **) ['error'] = :not_valid end |
#unlock_token_email(options) ⇒ Object
25 26 27 |
# File 'app/concepts/morpho/user/operation/unlock.rb', line 25 def unlock_token_email (, **) ['model'].resend_unlock_token_email! end |