Code

Updated modify state for fon and fax account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 07:54:43 +0000 (07:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 07:54:43 +0000 (07:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5527 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofax/faxaccount/class_gofaxAccount.inc
plugins/gofon/phoneaccount/class_phoneAccount.inc

index 8cda3f99163c45a8feb3d6e548a45154de7625b0..2984ce068f58caf3672970aaf2d72f7dc4e6e381 100644 (file)
@@ -136,7 +136,13 @@ class gofaxAccount extends plugin
 
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
-      $this->is_account= !$this->is_account;
+
+      /* Onyl change account state if allowed */
+      if($this->is_account && $this->acl == "#all#"){
+        $this->is_account= !$this->is_account;
+      }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+        $this->is_account= !$this->is_account;
+      }
     }
 
     /* Do we represent a valid account? */
index edd033610f3dbf47f2f203c1f5f44265f34cf382..44084810f9510cb565ce7e6dece2597817fa66c0 100644 (file)
@@ -830,7 +830,13 @@ class phoneAccount extends plugin
 
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
-      $this->is_account= !$this->is_account;
+
+      /* Onyl change account state if allowed */
+      if($this->is_account && $this->acl == "#all#"){
+        $this->is_account= !$this->is_account;
+      }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+        $this->is_account= !$this->is_account;
+      }
     }
 
     /* Select no macro if, state is empty, this is the case, if the selected macro is no longer available */