From: hickert Date: Tue, 8 Apr 2008 10:11:44 +0000 (+0000) Subject: Updated sudo X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f709bb1bb89176ef38706971dd86214504795f27;p=gosa.git Updated sudo -Added snapshot functionality git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10277 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc index fc65d03ed..de0371866 100644 --- a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc +++ b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc @@ -65,7 +65,10 @@ class divListSudo extends MultiSelectWindow $this->EnableSaveButton (false); /* Dynamic action col, depending on snapshot icons */ - $action_col_size = 80; + $action_col_size = 50; + if($this->parent->snapshotEnabled()){ + $action_col_size += 38; + } /* Toggle all selected / deselected */ $chk = "get_snapshot_header(TRUE); + } + + $this->SetDropDownHeaderMenu($s); $this->SetListHeader($listhead); } @@ -141,7 +151,10 @@ class divListSudo extends MultiSelectWindow $userimg = "Sudo"; $ui = get_userinfo(); - $action_col_size = 80; + $action_col_size = 50; + if($this->parent->snapshotEnabled()){ + $action_col_size += 38; + } // Test Every Entry and generate divlist Array foreach($list as $key => $val){ @@ -154,6 +167,10 @@ class divListSudo extends MultiSelectWindow $actions.= ""; + if(preg_match("/(c.*w|w.*c)/",$acl)){ + $actions.= $this->GetSnapShotActions($val['dn']); + } + if(preg_match("/d/",$acl)){ $actions.= ""; diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc index 9571c7ed0..835e3a224 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc @@ -307,6 +307,11 @@ class sudoManagement extends plugin return ($display); } + /* Check if there is a snapshot dialog open */ + if($str = $this->showSnapshotDialog(sudo::get_sudoers_ou($this->config),$this->get_used_snapshot_bases())){ + return($str); + } + /* Display dialog with sudo list */ $this->DivListSudo->execute(); $this->reload (); @@ -398,6 +403,10 @@ class sudoManagement extends plugin del_lock($this->dns); } } + + function get_used_snapshot_bases(){ + return(array(sudo::get_sudoers_ou($this->config))); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>