summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b0175f9)
raw | patch | inline | side by side (parent: b0175f9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 06:10:30 +0000 (06:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 06:10:30 +0000 (06:10 +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/branches/2.5@4453 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/branches/2.5@4453 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_kolabAccount.inc | patch | blob | history | |
plugins/personal/mail/class_mailAccount.inc | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index 6fcbd06f9e8a6f6353c05b18d57a7d89a596d99f..6ef94120074c3b3c3d0a48e6cda475cc2bf209f8 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){
$smarty->assign('mail_account', 'true');
- } elseif($this-> initially_was_account && (isset($this->attrs['objectClass']) && (in_array("kolabInetOrgPerson",$this->attrs['objectClass'])))){
+ }elseif( isset($this->attrs) && isset($this->attrs['kolabHomeServer'])){
$smarty->assign('mail_account', 'true');
}else{
+ $this->is_account= false;
$smarty->assign('mail_account', '');
}
/* Optionally execute a command after we're done */
plugin::remove_from_parent();
+ /* This plugin and the mailAccount plugin are using the same objectClass
+ check here if the mail account still activated.
+ If mailAccount is activated we must re-add the the objectClass.
+ */
if(!in_array("kolabInetOrgPerson",$this->attrs['objectClass'])){
$this->attrs['objectClass'][] = "kolabInetOrgPerson";
}
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index ffaabee6e356adec5254b5099028196cefcfd510..95a46b165c547615eb2e8f43b7495d8b9de54aa0 100644 (file)
/* Show tab dialog headers */
if ($this->parent != NULL){
if ($this->is_account){
- $display= $this->show_header(_("Remove mail account"),
- _("This account has mail features enabled. You can disable them by clicking below."));
+ if($this->accountDelegationsConfigured()){
+ $display= $this->show_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_header(_("Remove mail account"),
+ _("This account has mail features enabled. You can disable them by clicking below."));
+ }
} else {
$display= $this->show_header(_("Create mail account"), _("This account has mail features disabled. You can enable them by clicking below."));
return ($display);
}
}
-
/* Forwarder subdialog */
/* Trigger forward add dialog? */
return ($display);
}
+ /* 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);
+ }
+
/* remove object from parent */
function remove_from_parent()