summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dfabd15)
raw | patch | inline | side by side (parent: dfabd15)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 07:02:36 +0000 (07:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 07:02:36 +0000 (07:02 +0000) |
- Deleigations are only available if the user has already a valid kolabAccount
Fixed mailAccount
- If there are kolabDelegations configured you can't remove the mailAcoount until the delegations are removed.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4457 594d385d-05f5-0310-b6e9-bd551577e9d8
Fixed mailAccount
- If there are kolabDelegations configured you can't remove the mailAcoount until the delegations are removed.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4457 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index 30f696def529bd17e00832ace8f28c6a48d1b285..6a5895863242a5c2ba27afebca096980a7f8d54b 100644 (file)
var $kolabDelegate = array();
/* attribute list for save action */
- var $attributes = array("kolabFreeBusyFuture", "unrestrictedMailSize", "calFBURL","kolabDelegate");
+ var $attributes = array("kolabFreeBusyFuture", "unrestrictedMailSize", "calFBURL","kolabDelegate","kolabInvitationPolicy");
var $objectclasses = array("kolabInetOrgPerson");
/* Helper */
/* Transfer account states for this union */
if (isset($this->parent) && $this->parent->by_object['mailAccount']->is_account){
$this->mail_Account = true;
- } elseif($this-> initially_was_account && (isset($this->attrs['objectClass']) && (in_array("kolabInetOrgPerson",$this->attrs['objectClass'])))){
- $this->mail_Account = true;
+ }elseif( isset($this->attrs) && isset($this->attrs['kolabHomeServer'])){
+ $this->mail_Account= true;
+ }else{
+ $this->is_account = false;
+ $this->mail_Account = false;
}
}
index 97c63d905de8b8d8c9e3682893875f3a1b91e8e6..8b7bd6ed13b1e7d6575bce485bbb58d52dd233f4 100644 (file)
-{if $mail_account ne 'true'}
+{if !$mail_account}
<h2>{t}Kolab account{/t}</h2>
{t}The kolab account is currently disabled. It's features can be adjusted if you add a mail account.{/t}
{else}
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index a8a201e39ea49d615d01301a65d7a935052b012b..570d6227cdc02d88b068bc2ac5261f1b18c965bf 100644 (file)
/* Show tab dialog headers */
if ($this->parent != NULL){
if ($this->is_account){
- $display= $this->show_disable_header(_("Remove mail account"),
- _("This account has mail features enabled. You can disable them by clicking below."));
+ if($this->accountDelegationsConfigured()){
+ $display= $this->show_disable_header(_("Remove mail account"),
+ _("This account can't be removed while there are delegations configured. Remove those delegations first."),TRUE,TRUE);
+ }else{
+ $display= $this->show_disable_header(_("Remove mail account"),
+ _("This account has mail features enabled. You can disable them by clicking below."));
+ }
} else {
$display= $this->show_enable_header(_("Create mail account"), _("This account has mail features disabled. You can enable them by clicking below."));
return ($display);
$this->handle_post_events("remove");
}
+
+ /* check if we have some delegations configured, those delegations must be removed first */
+ function accountDelegationsConfigured()
+ {
+ /* We are in administrational edit mode.
+ Check tab configurations directly */
+ if(isset($this->attrs)){
+ $checkArray = array("kolabInvitationPolicy","unrestrictedMailSize", "calFBURL","kolabDelegate","kolabFreeBusyFuture");
+ foreach($checkArray as $index){
+ if(isset($this->attrs[$index])){
+ return(true);
+ }
+ }
+ }
+ return(false);
+ }
+
/* Save data to object */
function save_object()