Class: Booth::Models::Credential
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Booth::Models::Credential
- Defined in:
- lib/booth/models/credential.rb
Overview
Essentially the username for logging in.
Instance Method Summary collapse
- #blocked? ⇒ Boolean
- #registered_authenticator_ids ⇒ Object
- #registered_authenticators? ⇒ Boolean
- #remote_session_available? ⇒ Boolean
Instance Method Details
#blocked? ⇒ Boolean
25 26 27 |
# File 'lib/booth/models/credential.rb', line 25 def blocked? blocked_at.present? end |
#registered_authenticator_ids ⇒ Object
37 38 39 40 41 |
# File 'lib/booth/models/credential.rb', line 37 def registered_authenticator_ids authenticators.registered_scope .sorted_scope .pluck(:device_id) end |
#registered_authenticators? ⇒ Boolean
33 34 35 |
# File 'lib/booth/models/credential.rb', line 33 def registered_authenticators? registered_authenticator_ids.any? end |
#remote_session_available? ⇒ Boolean
29 30 31 |
# File 'lib/booth/models/credential.rb', line 29 def remote_session_available? sessions.active_scope.any? end |