Skip to content

Commit

Permalink
fix(preferences): Disable auxiliary mail accounts creation when SOGoC…
Browse files Browse the repository at this point in the history
…reateIdentitiesDisabled is enabled
  • Loading branch information
WoodySlum committed Jun 28, 2023
1 parent a95f6c0 commit b666137
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Documentation/SOGoInstallationGuide.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ specified as an array of dictionaries.
|JWT secret according to RFC-7519. Default value is `SOGo`.
|D |SOGoCreateIdentitiesDisabled
|Disable identity creation for users in preferences. If `YES`, users won't be able to add new identities and will allow to change only full name, signature and default identity. Default value is `NO`.
|Disable identity creation for users in preferences. If `YES`, users won't be able to add new identities and will allow to change only full name, signature and default identity. Default value is `NO`. Note : If this settings is set to `YES`, it will not be possible to crete auxiliary mail accounts.
Expand Down
8 changes: 8 additions & 0 deletions UI/PreferencesUI/UIxPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -1807,4 +1807,12 @@ - (BOOL) isEasUIEnabled
return ![[SOGoSystemDefaults sharedSystemDefaults] isEasUIDisabled];
}

- (BOOL) showCreateIdentity
{
SOGoDomainDefaults *dd;
dd = [[context activeUser] domainDefaults];

return ![dd createIdentitiesDisabled];
}

@end
16 changes: 9 additions & 7 deletions UI/Templates/PreferencesUI/UIxPreferences.wox
Original file line number Diff line number Diff line change
Expand Up @@ -949,13 +949,15 @@
</md-list>

<var:if condition="mailAuxiliaryUserAccountsEnabled">
<div layout="row" layout-align="end center">
<md-button type="button"
ng-click="app.addMailAccount($event, preferencesForm)"
label:aria-label="Create Account">
<var:string label:value="New Mail Account"/>
</md-button>
</div>
<var:if condition="showCreateIdentity">
<div layout="row" layout-align="end center">
<md-button type="button"
ng-click="app.addMailAccount($event, preferencesForm)"
label:aria-label="Create Account">
<var:string label:value="New Mail Account"/>
</md-button>
</div>
</var:if>
</var:if>

</md-tab>
Expand Down

0 comments on commit b666137

Please sign in to comment.