From a5c1325973cf080d4c628cee4080e470c3d00b38 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 2 Apr 2008 10:08:26 +0000 Subject: [PATCH] Updated sudo stuff git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10109 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/admin/sudo/class_sudoManagement.inc | 13 +++++++++---- gosa-core/plugins/admin/sudo/remove.tpl | 7 +++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gosa-core/plugins/admin/sudo/class_sudoManagement.inc b/gosa-core/plugins/admin/sudo/class_sudoManagement.inc index 236ee4f7a..e9757df05 100644 --- a/gosa-core/plugins/admin/sudo/class_sudoManagement.inc +++ b/gosa-core/plugins/admin/sudo/class_sudoManagement.inc @@ -29,6 +29,8 @@ class sudoManagement extends plugin var $DivListSudo = NULL; var $base = ""; + var $sudotabs = NULL; + function sudoManagement (&$config, &$ui) { /* Save configuration for internal use */ @@ -36,7 +38,10 @@ class sudoManagement extends plugin $this->ui = &$ui; $this->base = get_ou("sudoou"); - echo "base checks, maybe it is not set, or it do not exists";; + if(empty($this->base)){ + //FIXME Optimize this message, maybe with msgPool + msg_dialog::display(_("Configuration"),sprintf(_("The sudo object path is not configured."))); + } /* Create dialog object */ $this->DivListSudo = new divListSudo($this->config,$this); @@ -153,7 +158,7 @@ class sudoManagement extends plugin ********************/ /* User wants to edit data? */ - if (($s_action=="edit") && !is_object($this->sudotabs)){ + if (($s_action=="edit_role") && !is_object($this->sudotabs)){ /* Get 'dn' from posted 'uid', must be unique */ $this->dn= $this->list[trim($s_entry)]['dn']; @@ -256,7 +261,7 @@ class sudoManagement extends plugin ********************/ /* Remove sudo was requested */ - if ($s_action=="del"){ + if ($s_action=="del_role"){ /* Get 'dn' from posted 'uid' */ $this->dn= $this->list[trim($s_entry)]['dn']; @@ -409,7 +414,7 @@ class sudoManagement extends plugin ********************/ $values = array("cn","description","sudoUser","sudoCommand","sudoOption"); $ff = "(&(|(cn=".$Regex.")(description=".$Regex."))(sudoUser=".$UserRegex.")(objectClass=sudoRole))"; - $res = get_list($ff, "sudo",$base,$values, GL_SUBSEARCH); + $res = get_list($ff, "sudo",$base,$values, GL_SIZELIMIT); $tmp = array(); foreach($res as $attrs){ $tmp[$attrs['cn'][0]] = $attrs; diff --git a/gosa-core/plugins/admin/sudo/remove.tpl b/gosa-core/plugins/admin/sudo/remove.tpl index c4405a19e..80b656b49 100644 --- a/gosa-core/plugins/admin/sudo/remove.tpl +++ b/gosa-core/plugins/admin/sudo/remove.tpl @@ -3,7 +3,6 @@

{$info} - {t}This may be a primary user group. Please double check if you really want to do this since there is no way for GOsa to get your data back.{/t}

@@ -13,11 +12,11 @@

{if $multiple} - +   - + {else} - +   {/if} -- 2.30.2