Class: Katello::ContentCredential

Inherits:
Model
  • Object
show all
Includes:
ForemanTasks::Concerns::ActionSubject, Authorization::ContentCredential
Defined in:
app/models/katello/content_credential.rb

Constant Summary collapse

MAX_CONTENT_LINE_LENGTH =
65
GPG_KEY_TYPE =
'gpg_key'.freeze
CERT_TYPE =
'cert'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Authorization::ContentCredential

#deletable?, #editable?, #readable?

Methods inherited from Model

#destroy!

Class Method Details

.humanize_class_name(_name = nil) ⇒ Object



57
58
59
# File 'app/models/katello/content_credential.rb', line 57

def self.humanize_class_name(_name = nil)
  _("Content Credentials")
end

Instance Method Details

#skip_strip_attrsObject



65
66
67
# File 'app/models/katello/content_credential.rb', line 65

def skip_strip_attrs
  ['content']
end

#to_labelObject



61
62
63
# File 'app/models/katello/content_credential.rb', line 61

def to_label
  "content credential (#{content_type} - #{name})"
end

#use_gpg_content_validator?Boolean



53
54
55
# File 'app/models/katello/content_credential.rb', line 53

def use_gpg_content_validator?
  content_type == GPG_KEY_TYPE && SETTINGS[:katello][:gpg_strict_validation]
end