Class: Installation::Widgets::PolkitDefaultPriv

Inherits:
CWM::ComboBox
  • Object
show all
Defined in:
src/lib/installation/widgets/polkit_default_priv.rb

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ PolkitDefaultPriv

Returns a new instance of PolkitDefaultPriv.



26
27
28
29
30
31
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 26

def initialize(settings)
  super()
  textdomain "installation"

  @settings = settings
end

Instance Method Details

#helpObject



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 41

def help
  "<b>#{label}</b>\n" +
    _(
      "<p>SUSE ships with three sets of default privilege " \
      "settings. These are as follows:<br><ul>" \
      "<li>\"restrictive\": conservative settings that " \
      "require the root user password for a lot of actions" \
      " and disable certain actions completely for remote " \
      "users.</li>" \
      "<li>\"standard\": balanced settings that restrict " \
      "sensitive actions to require root authentication " \
      "but allow less dangerous operations for regular " \
      "logged in users.</li>" \
      "<li>\"easy\": settings that are focused on ease " \
      "of use. This sacrifices security to some degree " \
      "to allow a more seamless user experience without" \
      " interruptions in the workflow due to password " \
      "prompts.</li></ul><br>" \
      "The \"default\" is to keep value empty and it will be " \
      "assigned automatically.</p>"
    )
end

#initObject



64
65
66
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 64

def init
  self.value = @settings.polkit_default_privileges.to_s
end

#itemsObject



37
38
39
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 37

def items
  @settings.human_polkit_privileges.to_a
end

#labelObject



33
34
35
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 33

def label
  _("PolicyKit Default Privileges")
end

#storeObject



68
69
70
# File 'src/lib/installation/widgets/polkit_default_priv.rb', line 68

def store
  @settings.polkit_default_privileges = value.empty? ? nil : value
end