Code

Updated workgeneric acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Jan 2007 04:53:54 +0000 (04:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 Jan 2007 04:53:54 +0000 (04:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5546 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiManagement.inc
plugins/admin/groups/acl_definition.inc
plugins/admin/systems/class_workstationGeneric.inc

index 7175099fdcabb949f89bbb4049c72b72b0d617b8..16c39074b59b3fd22168dfce036f3f3520e61593 100644 (file)
@@ -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;
                }
index 83d3d0050cfb1af7e3bffac64aa2bbd16b20b17f..f9319b0cc99f34985acc94bfe62422c30145b5f9 100644 (file)
@@ -110,6 +110,7 @@ $ACLD['workgeneric']=   array("base",
                        "gotoMode",
                        "gotoSyslogServer",
                        "gotoNtpServer",
+                       "FAIstate",
                        "action",
                        "password");
 $ACLD['workstartup']=   array("gotoBootKernel",
index 577ed196c8322c4b9606977e3c082a896d5d7dcf..ea542f1448687f50cd043afc0d6d023b1a4c3ae2 100644 (file)
@@ -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 */