From 6d8e8421cb385ed3af2735b04ca47eae839224a0 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 9 Dec 2008 10:55:16 +0000 Subject: [PATCH] Update mail Account git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13200 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../mail/kolab/class_mail-methods-kolab.inc | 15 +++++++++++++++ .../mail/personal/mail/class_mail-methods.inc | 6 +++++- .../mail/personal/mail/class_mailAccount.inc | 11 +++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc index ef5bf392a..6b1e72f4e 100644 --- a/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc +++ b/gosa-plugins/kolab/personal/mail/kolab/class_mail-methods-kolab.inc @@ -178,6 +178,21 @@ class mailMethodKolab extends mailMethodCyrus "Setting Quota"); return(TRUE); } + + + public function allow_remove(&$reason) + { + if(isset($this->parent->attrs)){ + if(in_array_ics("kolabDeleteFlag",array_keys($this->parent->attrs))){ + $reason = _("Waiting for kolab to remove mail properties..."); + return(FALSE); + }elseif(in_array("gosaMailAccount",$this->parent->attrs['objectClass'])){ + $reason = _("Please remove the mail settings first to allow kolab to call its remove methods!"); + return(FALSE); + } + } + return(TRUE); + } } diff --git a/gosa-plugins/mail/personal/mail/class_mail-methods.inc b/gosa-plugins/mail/personal/mail/class_mail-methods.inc index 0d4e36a94..3d5698a94 100644 --- a/gosa-plugins/mail/personal/mail/class_mail-methods.inc +++ b/gosa-plugins/mail/personal/mail/class_mail-methods.inc @@ -665,7 +665,11 @@ class mailMethod{ { return($this->enableFolderTypes); } - + + public function allow_remove(&$reason) + { + return(TRUE); + } } diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc index 147802851..ccad100f2 100644 --- a/gosa-plugins/mail/personal/mail/class_mailAccount.inc +++ b/gosa-plugins/mail/personal/mail/class_mailAccount.inc @@ -1336,6 +1336,17 @@ class mailAccount extends plugin } + function allow_remove() + { + $resason = ""; + if(!$this->mailMethod->allow_remove($reason)){ + return($reason); + } + return(""); + } + + + /*! \brief ACL settings */ static function plInfo() -- 2.30.2