summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06ec029)
raw | patch | inline | side by side (parent: 06ec029)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Jul 2006 11:44:44 +0000 (11:44 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Jul 2006 11:44:44 +0000 (11:44 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4025 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/acl/class_acl.inc | patch | blob | history | |
plugins/admin/acl/contents.tpl | [new file with mode: 0644] | patch | blob |
plugins/admin/acl/main.inc | [new file with mode: 0644] | patch | blob |
index a5f37b78eb53916d83fd03727b5a54ae9794249a..49b1cdf561157692fcac227da82742b38fba29a3 100644 (file)
class acl extends plugin
{
+ /* Definitions */
+ var $plHeadline= "Access control";
+ var $plDescription= "This does something";
+
+ /* attribute list for save action */
+ var $attributes= array("target", "nmessage");
+ var $objectclasses= array();
+
- /* constructor, if 'dn' is set, the node loads the given
- 'dn' from LDAP */
function acl ($config, $dn= NULL)
{
+ /* Include config object */
$this->config= $config;
+ }
+
+
+ function execute()
+ {
+ /* Call parent execute */
+ plugin::execute();
- /* Load base attributes */
- plugin::plugin ($config, $dn);
+ $smarty= get_smarty();
+ /* Show main page */
+ return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
}
}
diff --git a/plugins/admin/acl/contents.tpl b/plugins/admin/acl/contents.tpl
--- /dev/null
@@ -0,0 +1,3 @@
+<b>Hard coded DN for testing</b>
+<br>
+Some acl stuff here...
diff --git a/plugins/admin/acl/main.inc b/plugins/admin/acl/main.inc
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2005 Cajus Pollmeier
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+if (!$remove_lock){
+ /* Create message object on demand */
+ if (!isset($_SESSION['aclplug']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
+ $_SESSION['aclplug']= new acl ($config, 'ou=Direktorium,o=Landeshauptstadt München,c=de');
+ }
+ $aclplug= $_SESSION['aclplug'];
+
+ /* Set permissions */
+ $acl= get_permissions ($ui->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 */
+ $display= $aclplug->execute();
+ $display.= "<input type=\"hidden\" name=\"ignore\">\n";
+
+ /* Page header*/
+ $display= print_header(get_template_path('images/acl.png'), _("Access control")).$display;
+
+ /* Store changes in session */
+ $_SESSION['aclplug']= $aclplug;
+}
+?>