diff --git a/package/yast2-users.changes b/package/yast2-users.changes index 7f9c11c15..7be488d75 100644 --- a/package/yast2-users.changes +++ b/package/yast2-users.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 3 10:31:26 UTC 2014 - ckornacker@suse.com + +- migrate ldap/kerberos-client to auth-client (bnc#865812) +- 3.1.14 + ------------------------------------------------------------------- Fri Feb 28 13:41:12 CET 2014 - jsuchome@suse.cz diff --git a/package/yast2-users.spec b/package/yast2-users.spec index d756f10e0..e81d61e78 100644 --- a/package/yast2-users.spec +++ b/package/yast2-users.spec @@ -17,7 +17,7 @@ Name: yast2-users -Version: 3.1.13 +Version: 3.1.14 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff --git a/src/include/users/widgets.rb b/src/include/users/widgets.rb index d41de3c19..b96dad67f 100644 --- a/src/include/users/widgets.rb +++ b/src/include/users/widgets.rb @@ -34,6 +34,7 @@ def initialize_users_widgets(include_target) Yast.import "CWMTab" Yast.import "Label" Yast.import "Ldap" + Yast.import "AuthClient" Yast.import "Message" Yast.import "Mode" Yast.import "Package" @@ -126,7 +127,7 @@ def initialize_users_widgets(include_target) # list of installed clients @installed_clients = [] - @configurable_clients = ["nis", "ldap", "kerberos", "samba"] + @configurable_clients = ["nis", "sssd", "samba"] # save if no more Available calls should be done (bug #225484) @check_available = true @@ -135,16 +136,32 @@ def initialize_users_widgets(include_target) # richtext label "nis" => _("NIS"), # richtext label - "ldap" => _("LDAP"), - # richtext label - "kerberos" => _("Kerberos"), + "sssd" => _("SSSD"), # richtext label "samba" => _("Samba") } - # name of module to call - @call_module = { "samba" => "samba-client" } - + # auth methods and respective module calls + @auth_methods = { + "nis" => { + # menubutton label + "label" => _("&NIS"), + "package" => "yast2-nis-client", + "call" => "nis-client" + }, + "sssd" => { + # menubutton label + "label" => _("&SSSD"), + "package" => "yast2-auth-client", + "call" => "auth-client" + }, + "samba" => { + # menubutton label + "label" => _("&Samba"), + "package" => "yast2-samba-client", + "call" => "samba-client" + }, + } @tabs_description = { "users" => { @@ -429,7 +446,7 @@ def initialize_users_widgets(include_target) MenuButton(Opt(:key_F4), _("&Configure..."), []) ) ), - "handle_events" => ["ldap", "nis", "kerberos", "samba"] + "handle_events" => ["sssd", "nis", "samba"] } } end @@ -2308,17 +2325,13 @@ def get_module_data(client) progress_orig = Progress.set(false) if !Builtins.contains(@installed_clients, client) ret = Summary.NotConfigured - elsif client == "ldap" - Ldap.Read - ret = Ldap.ShortSummary + elsif client == "sssd" + AuthClient.Read + ret = AuthClient.Summary elsif client == "nis" WFM.CallFunction("nis_auto", ["Read"]) a = WFM.CallFunction("nis_auto", ["ShortSummary"]) ret = Convert.to_string(a) if Ops.is_string?(a) - elsif client == "kerberos" - WFM.CallFunction("kerberos-client_auto", ["Read"]) - a = WFM.CallFunction("kerberos-client_auto", ["ShortSummary"]) - ret = Convert.to_string(a) if Ops.is_string?(a) elsif client == "samba" WFM.CallFunction("samba-client_auto", ["Read"]) a = WFM.CallFunction("samba-client_auto", ["ShortSummary"]) @@ -2356,37 +2369,14 @@ def reload_config(clients) def InitAuthData(key) mb = [] - auth_methods = { - "nis" => { - # menubutton label - "label" => _("&NIS"), - "package" => "yast2-nis-client", - }, - "ldap" => { - # menubutton label - "label" => _("&LDAP"), - "package" => "yast2-auth-client", - }, - "kerberos" => { - # menubutton label - "label" => _("&Kerberos"), - "package" => "yast2-auth-client", - }, - "samba" => { - # menubutton label - "label" => _("&Samba"), - "package" => "yast2-samba-client", - }, - } - # check availability of authentication packages, # update the RichText summary and menubutton labels accordingly Builtins.foreach(@configurable_clients) do |client| - package = auth_methods[client]["package"] or raise "Unknown auth client #{client}" + package = @auth_methods[client]["package"] or raise "Unknown auth client #{client}" client_item = Item( Id(client), - auth_methods[client]["label"] + @auth_methods[client]["label"] ) if Package.Installed(package) @@ -2426,7 +2416,7 @@ def HandleAuthData(key, event) return nil if !Builtins.contains(@configurable_clients, button) if !Builtins.contains(@installed_clients, button) - package = Builtins.sformat("yast2-%1-client", button) + package = @auth_methods[client]["package"] if @check_available avai = Package.Available(package) if avai == nil @@ -2462,7 +2452,7 @@ def HandleAuthData(key, event) end end param = installation ? ["from_users"] : [] - if WFM.CallFunction(Ops.get_string(@call_module, button, button), param) == :next + if WFM.CallFunction(@auth_methods[button]["call"], param) == :next UI.ChangeWidget(Id("auth_summary"), :Value, reload_config([])) end nil