Class: Actions::Katello::Organization::SimpleContentAccess::Enable

Inherits:
Toggle show all
Defined in:
app/lib/actions/katello/organization/simple_content_access/enable.rb

Constant Summary

Constants inherited from Toggle

Toggle::SIMPLE_CONTENT_ACCESS_DISABLED_VALUE, Toggle::SIMPLE_CONTENT_ACCESS_ENABLED_VALUE

Instance Attribute Summary

Attributes inherited from Toggle

#organization

Instance Method Summary collapse

Methods inherited from Toggle

#failure_notification, #humanized_input, #run, #success_notification

Methods included from Helpers::Notifications

#failure_notification, #get_foreman_task, included, #plan_failed?, #send_notification, #subject_organization, #success_notification

Methods inherited from AbstractAsyncTask

#humanized_output, #rescue_strategy

Instance Method Details

#content_access_mode_valueObject



16
17
18
# File 'app/lib/actions/katello/organization/simple_content_access/enable.rb', line 16

def content_access_mode_value
  SIMPLE_CONTENT_ACCESS_ENABLED_VALUE
end

#humanized_nameObject



20
21
22
# File 'app/lib/actions/katello/organization/simple_content_access/enable.rb', line 20

def humanized_name
  N_("Enable Simple Content Access")
end

#plan(organization_id, auto_create_overrides: true) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'app/lib/actions/katello/organization/simple_content_access/enable.rb', line 6

def plan(organization_id, auto_create_overrides: true)
  input[:auto_create_overrides] = auto_create_overrides
  sequence do
    if auto_create_overrides
      plan_action(PrepareContentOverrides, organization_id)
    end
    super(organization_id) # puts plan_self inside the sequence
  end
end

#task_error_notificationObject



28
29
30
# File 'app/lib/actions/katello/organization/simple_content_access/enable.rb', line 28

def task_error_notification
  ::Katello::UINotifications::Subscriptions::SCAEnableError
end

#task_success_notificationObject



24
25
26
# File 'app/lib/actions/katello/organization/simple_content_access/enable.rb', line 24

def task_success_notification
  ::Katello::UINotifications::Subscriptions::SCAEnableSuccess
end