From: hickert Date: Wed, 27 Jan 2010 10:01:39 +0000 (+0000) Subject: Updated sudo to use the new kind of dialogs X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=16a6db098680489918f7cc7d577de6430e98da1f;p=gosa.git Updated sudo to use the new kind of dialogs git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15359 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc index acab2b3fa..97c6cec30 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc @@ -229,15 +229,11 @@ class sudo extends plugin *********************/ if(isset($_POST['list_sudoHost']) && !is_object($this->dialog) && $this->acl_is_writeable("sudoHost")){ - $used = array(); - foreach($this->sudoHost as $name){ - $used[] = preg_replace("/^!/","",$name); - } - $this->dialog =new target_list_systems($this->config,$used); + $this->dialog =new systemSelect($this->config,get_userinfo()); } /* Add selected hosts to the sudoHost list */ - if(isset($_POST['SavetargetSelectDialog']) && $this->dialog instanceof target_list_systems){ + if(isset($_POST['systemSelect_save']) && $this->dialog instanceof systemSelect){ if($this->acl_is_writeable("sudoHost")){ foreach($this->dialog->save() as $entry){ $cn = trim($entry['cn'][0]); @@ -250,16 +246,26 @@ class sudo extends plugin $this->dialog = NULL; } + if(isset($_POST['systemSelect_cancel']) && $this->dialog instanceOf systemSelect){ + unset($this->dialog); + $this->dialog = NULL; + } + + if($this->dialog instanceOf systemSelect){ + $used = array(); + foreach($this->sudoHost as $name){ + $used['cn'][] = preg_replace("/^!/","",$name); + } + // Build up blocklist + session::set('filterBlacklist', $used); + return($this->dialog->execute()); + } + /********************* Dialog handling / display / close *********************/ - if(isset($_POST['userGroupSelect_cancel']) && is_object($this->dialog)){ - unset($this->dialog); - $this->dialog = NULL; - } - if(is_object($this->dialog)){ return($this->dialog->execute()); }