Class: JobTemplateEffectiveUser
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- JobTemplateEffectiveUser
- Defined in:
- app/models/job_template_effective_user.rb
Instance Method Summary collapse
Instance Method Details
#compute_value ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/models/job_template_effective_user.rb', line 12 def compute_value if current_user? User.current.login elsif value.present? value else Setting[:remote_execution_effective_user] end end |
#set_defaults ⇒ Object
7 8 9 10 |
# File 'app/models/job_template_effective_user.rb', line 7 def set_defaults self.overridable = true if self.overridable.nil? self.current_user = false if self.current_user.nil? end |