From: hickert Date: Thu, 11 Jan 2007 07:54:43 +0000 (+0000) Subject: Updated modify state for fon and fax account X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=160b175dba1e9570c859a018fa56a3f7fd239e97;p=gosa.git Updated modify state for fon and fax account git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5527 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 8cda3f991..2984ce068 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -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? */ diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index edd033610..44084810f 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -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 */