From: hickert Date: Tue, 9 Dec 2008 10:55:16 +0000 (+0000) Subject: Update mail Account X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d8e8421cb385ed3af2735b04ca47eae839224a0;p=gosa.git Update mail Account git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13200 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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()