Skip to content

Commit

Permalink
Merge branch 'bugfix/ZCS-3311' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
k-kato committed Jan 24, 2018
2 parents bd4659d + 745321f commit 2b46a99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion WebRoot/js/zimbraAdmin/accounts/model/ZaAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -2533,6 +2533,11 @@ ZaAccount.isEmailRetentionPolicyEnabled = function () {
try {
var instance = this.getInstance () ;
var gc = ZaApp.getInstance().getGlobalConfig();
if (AjxUtil.isEmpty(instance.attrs[ZaAccount.A_mailHost])) {
// GetEffectiveRightsRequest fails with an exception if a server name is blank
var ex = new ZmCsfeException("The request was not sent", ZmCsfeException.ACCT_INVALID_ATTR_VALUE, "GetEffectiveRightsRequest", "zimbraMailHost cannot be read");
throw(ex);
}
var sc = ZaApp.getInstance().getServerByName(instance.attrs[ZaAccount.A_mailHost]);
var s_mailpurge = sc.attrs[ZaServer.A_zimbraMailPurgeSleepInterval] ; //always end with [s,m,h,d]
var g_mailpurge = gc.attrs[ZaGlobalConfig.A_zimbraMailPurgeSleepInterval] ;
Expand All @@ -2547,7 +2552,7 @@ ZaAccount.isEmailRetentionPolicyEnabled = function () {

return true ;
} catch (ex) {
return true;
return false;
}
}

Expand Down
3 changes: 2 additions & 1 deletion WebRoot/js/zimbraAdmin/accounts/view/ZaAccountXFormView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3467,7 +3467,8 @@ textFieldCssClass:"admin_xform_number_input"}
ZaAccount.A_zimbraMailTrashLifetime,
ZaAccount.A_zimbraMailSpamLifetime,
ZaAccount.A_zimbraMailDumpsterLifetime
]],[XForm.checkInstanceValueNot,ZaAccount.A_zimbraIsExternalVirtualAccount,"TRUE"]],
]],[XForm.checkInstanceValueNot,ZaAccount.A_zimbraIsExternalVirtualAccount,"TRUE"],
[ZaAccount.isEmailRetentionPolicyEnabled]],
label:ZaMsg.NAD_MailRetentionGrouper, id: "mailretention_settings",
items: [
{ type: _DWT_ALERT_,
Expand Down

0 comments on commit 2b46a99

Please sign in to comment.