From: hickert Date: Fri, 21 Jul 2006 04:28:49 +0000 (+0000) Subject: Only allow toggle account in we have create remove acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=59265d53dab4d53046ab968e7eabfa33a88ead4d;p=gosa.git Only allow toggle account in we have create remove acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4262 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 6111b8405..018d6ec04 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -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? */