From a4fc9ca2d8ce95761f34400e79a7b44b09a23fb6 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 10 Jul 2006 10:53:42 +0000 Subject: [PATCH] Updated acl handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4070 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/acl/class_acl.inc | 6 +++ plugins/admin/acl/main.inc | 66 ++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/plugins/admin/acl/class_acl.inc b/plugins/admin/acl/class_acl.inc index e730cd6fd..bbfdefc4b 100644 --- a/plugins/admin/acl/class_acl.inc +++ b/plugins/admin/acl/class_acl.inc @@ -745,6 +745,12 @@ class acl extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving ACLs with dn '%s' failed."),$this->dn)); } + + function remove_from_parent() + { + echo "remove_from_parent() called"; + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/plugins/admin/acl/main.inc b/plugins/admin/acl/main.inc index bb40d6ce7..a1c2296f6 100644 --- a/plugins/admin/acl/main.inc +++ b/plugins/admin/acl/main.inc @@ -1,7 +1,7 @@ dn, $ui->subtreeACL); - $aclplug->acl= get_module_permission($acl, "acl", $ui->dn); - - /* save changes back to object */ - if (isset ($_POST['target'])){ - $aclplug->save_object (); - } - - /* Execute formular */ - if ($aclplug->aclPostHandler()){ - echo "Saved... But this is not the way it goes normally!"; - } - $display= $aclplug->execute(); - $display.= "\n"; - - /* Page header*/ - $display= print_header(get_template_path('images/acl.png'), _("Access control")).$display; - - /* Store changes in session */ - $_SESSION['aclplug']= $aclplug; +if ($remove_lock){ + if(isset($_SESSION['macl'])){ + $macl= $_SESSION['macl']; + $macl->remove_lock(); + del_lock ($ui->dn); + sess_del ('macl'); + } +} else { + $display= "No headpage yet for this module"; + +# /* Create usermanagement object on demand */ +# if (!isset($_SESSION['macl']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ +# $_SESSION['macl']= new aclManagement($config, $ui); +# } +# $macl= $_SESSION['macl']; +# +# /* Show and save dialog */ +# $macl->save_object(); +# $output= $macl->execute(); +# +# /* Page header*/ +# if (isset($_SESSION['objectinfo'])){ +# $display= print_header(get_template_path('images/acl.png'), _("ACL management"), "\"\" ".@LDAP::fix($_SESSION['objectinfo'])); +# } else { +# $display= print_header(get_template_path('images/acl.png'), _("ACL management")); +# } +# +# /* Reset requested? */ +# if (isset($_GET['reset']) && $_GET['reset'] == 1){ +# del_lock ($ui->dn); +# sess_del ('macl'); +# } +# +# $display.= $output; +# $_SESSION['macl']= $macl; } + ?> -- 2.30.2