From db74eb0d8e1a7dfbe6b0d8ca02f3f475622cd5d4 Mon Sep 17 00:00:00 2001 From: zeph Date: Sun, 23 Mar 2008 21:21:00 +0000 Subject: [PATCH] various at sudo-ldap + ranaming git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5-plugins@9961 594d385d-05f5-0310-b6e9-bd551577e9d8 --- sudo-ldap/src/class_sudoLdap.inc | 20 +++++++++++++++++--- sudo-ldap/src/sudoldap.tpl | 5 ++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sudo-ldap/src/class_sudoLdap.inc b/sudo-ldap/src/class_sudoLdap.inc index bdbd9a1c9..7319e73ba 100644 --- a/sudo-ldap/src/class_sudoLdap.inc +++ b/sudo-ldap/src/class_sudoLdap.inc @@ -1,6 +1,6 @@ \version 1.00 \date 22.03.2008 @@ -9,7 +9,7 @@ relevant for sudo-ldap from/to the LDAP. */ -class sudoLdap extends plugin +class sudoldap extends plugin { /* Definitions */ var $plHeadline= "sudo-ldap"; @@ -27,7 +27,7 @@ class sudoLdap extends plugin /* constructor, if 'dn' is set, the node loads the given 'dn' from LDAP */ - function sudoLdap ($config, $dn= NULL, $parent= NULL) + function sudoldap ($config, $dn= NULL, $parent= NULL) { /* Configuration is fine, allways */ $this->config= $config; @@ -48,6 +48,20 @@ class sudoLdap extends plugin $display= ""; $smarty= get_smarty(); + /* Add empty new zone + */ + if(isset($_POST['AddRole']) && chkacl($this->acl,"sudoldap") == ""){ + $this->dialog = new sudoldapEditRole($this->config,$this->dn); + } + + /* Show dialog + */ + if($this->dialog!= NULL){ + $this->dialog->save_object(); + $this->dialog->parent = $this; + return($this->dialog->execute()); + } + $RoleList = new divSelectBox("sudoRoles"); $RoleList -> SetHeight(300); $editImg = " diff --git a/sudo-ldap/src/sudoldap.tpl b/sudo-ldap/src/sudoldap.tpl index 409f218c3..0f609735a 100644 --- a/sudo-ldap/src/sudoldap.tpl +++ b/sudo-ldap/src/sudoldap.tpl @@ -1,9 +1,12 @@
-

{t}Sudo Roles{/t}

+

{t}Sudo Roles{/t}

{$RoleList} + +
-- 2.30.2