From 1d15d5175f46e86f0234d9ed7499cf96773e2929 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 12 Jan 2007 04:53:54 +0000 Subject: [PATCH] Updated workgeneric acls git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5546 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiManagement.inc | 2 +- plugins/admin/groups/acl_definition.inc | 1 + plugins/admin/systems/class_workstationGeneric.inc | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 7175099fd..16c39074b 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -255,7 +255,7 @@ class faiManagement extends plugin $this->is_dialog = true; if($entry['FAIstate'] == "freeze"){ - $this->dialog->set_acl(array("*none*")) ; + $this->dialog->set_acl(array("#none#")) ; } $_SESSION['objectinfo'] = $this->dn; } diff --git a/plugins/admin/groups/acl_definition.inc b/plugins/admin/groups/acl_definition.inc index 83d3d0050..f9319b0cc 100644 --- a/plugins/admin/groups/acl_definition.inc +++ b/plugins/admin/groups/acl_definition.inc @@ -110,6 +110,7 @@ $ACLD['workgeneric']= array("base", "gotoMode", "gotoSyslogServer", "gotoNtpServer", + "FAIstate", "action", "password"); $ACLD['workstartup']= array("gotoBootKernel", diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 577ed196c..ea542f144 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -71,6 +71,7 @@ class workgeneric extends plugin plugin::plugin ($config, $dn, $parent); $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses); + $this->netConfigDNS->acl = $this->acl; /* Read arrays */ foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){ @@ -135,13 +136,14 @@ class workgeneric extends plugin { /* Call parent execute */ plugin::execute(); + $this->netConfigDNS->acl = $this->acl; /* Do we need to flip is_account state? */ if (isset($_POST['modify_state'])){ $this->is_account= !$this->is_account; } - if (isset($_POST['action'])){ + if (isset($_POST['action']) && chkacl($this->acl,"FAIstate") == ""){ $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD"); if ($cmd == ""){ print_red(_("No ACTIONCMD definition found in your gosa.conf")); @@ -220,12 +222,12 @@ class workgeneric extends plugin } /* Add new ntp Server to our list */ - if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){ + if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && chkacl($this->acl,"gotoNtpServer") == ""){ $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers']; } /* Delete selected NtpServer for list of used servers */ - if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){ + if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && chkacl($this->acl,"gotoNtpServer") == ""){ foreach($_POST['gotoNtpServerSelected'] as $name){ unset($this->gotoNtpServer[$name]); } @@ -284,6 +286,7 @@ class workgeneric extends plugin function remove_from_parent() { + $this->netConfigDNS->acl = $this->acl; $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); @@ -384,6 +387,7 @@ class workgeneric extends plugin /* Save to LDAP */ function save() { + $this->netConfigDNS->acl = $this->acl; plugin::save(); /* Strip out 'default' values */ -- 2.30.2