Code

Only allow toggle account in we have create remove acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Jul 2006 04:28:49 +0000 (04:28 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Jul 2006 04:28:49 +0000 (04:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4262 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index 6111b840555af05aaa95da4ad65847087d8f1bc2..018d6ec04d7c23ca4a19b68d167db777566b7f8d 100644 (file)
@@ -236,9 +236,14 @@ class posixAccount extends plugin
     }
 
     if(!$isCopyPaste){
+
       /* Do we need to flip is_account state? */
-      if (isset($_POST['modify_state'])){
-        $this->is_account= !$this->is_account;
+      if(isset($_POST['modify_state'])){
+        if($this->is_account && $this->acl_is_removeable()){
+          $this->is_account= FALSE;
+        }elseif(!$this->is_account && $this->acl_is_createable()){
+          $this->is_account= TRUE;
+        }
       }
 
       /* Do we represent a valid posixAccount? */