Class: ForemanVirtWhoConfigure::ServiceUser
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ForemanVirtWhoConfigure::ServiceUser
- Includes:
- Authorizable, Encryptable
- Defined in:
- app/models/foreman_virt_who_configure/service_user.rb
Overview
holds the encrypted password for internal user that can be deployed to virt who reporter
Instance Method Summary collapse
-
#name ⇒ Object
Foreman 1.11 specifics, can be removed later, otherwise when string does not start with “encrypts” prefix we get 500 when we try to create log message that relies on name method.
- #username ⇒ Object
Instance Method Details
#name ⇒ Object
Foreman 1.11 specifics, can be removed later, otherwise when string does not start with “encrypts” prefix we get 500 when we try to create log message that relies on name method
13 14 15 |
# File 'app/models/foreman_virt_who_configure/service_user.rb', line 13 def name username || to_s end |
#username ⇒ Object
17 18 19 20 21 |
# File 'app/models/foreman_virt_who_configure/service_user.rb', line 17 def username User.as_anonymous_admin do user&.login end end |