From 59265d53dab4d53046ab968e7eabfa33a88ead4d Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Jul 2006 04:28:49 +0000 Subject: [PATCH] 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 --- plugins/personal/posix/class_posixAccount.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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? */ -- 2.30.2