Class: Y2Network::Widgets::WirelessAuthMode

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

Instance Method Summary collapse

Constructor Details

#initialize(settings) ⇒ WirelessAuthMode


25
26
27
28
29
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 25

def initialize(settings)
  textdomain "network"

  @settings = settings
end

Instance Method Details

#helpObject


53
54
55
56
57
58
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 53

def help
  # TODO: improve help text, mention all options and security problems with WEP
  "<p>WPA-EAP uses a RADIUS server to authenticate users. There\n" \
  "are different methods in EAP to connect to the server and\n" \
  "perform the authentication, namely TLS, TTLS, and PEAP.</p>\n"
end

#initObject


31
32
33
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 31

def init
  self.value = @settings.auth_mode
end

#itemsObject


43
44
45
46
47
48
49
50
51
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 43

def items
  [
    ["no-encryption", _("No Encryption")],
    ["open", _("WEP - Open")],
    ["sharedkey", _("WEP - Shared Key")],
    ["wpa-psk", _("WPA-PSK (\"home\")")],
    ["wpa-eap", _("WPA-EAP (\"Enterprise\")")]
  ]
end

#labelObject


35
36
37
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 35

def label
  _("&Authentication Mode")
end

#optObject


39
40
41
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 39

def opt
  [:hstretch, :notify]
end

#storeObject


60
61
62
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 60

def store
  @settings.auth_mode = value
end