diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index aa4149f82..12bd7f2d8 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -2082,6 +2082,12 @@ parameter _SOGoSelectedAddressBook_. Defaults to `NO` when unset. +|D |SOGoMailCertificateEnabled +|Parameter used to enable S/MIME certificate management from the account editor of the +preferences window. + +Defaults to `YES` when unset. + |U |SOGoSelectedAddressBook |Parameter used to specify the address book in which to add unknown mail recipients if _SOGoMailAddOutgoingAddresses_ is enabled. diff --git a/SoObjects/SOGo/SOGoDefaults.plist b/SoObjects/SOGo/SOGoDefaults.plist index 627d6eb91..4081c5556 100644 --- a/SoObjects/SOGo/SOGoDefaults.plist +++ b/SoObjects/SOGo/SOGoDefaults.plist @@ -115,6 +115,7 @@ SOGoMailComposeMessageType = "html"; SOGoMailComposeFontSize = "0"; SOGoMailDisplayRemoteInlineImages = "never"; + SOGoMailCertificateEnabled = YES; SOGoMailAutoSave = "5"; diff --git a/SoObjects/SOGo/SOGoDomainDefaults.h b/SoObjects/SOGo/SOGoDomainDefaults.h index fafa07918..3be1974c3 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.h +++ b/SoObjects/SOGo/SOGoDomainDefaults.h @@ -66,6 +66,7 @@ - (BOOL) mailKeepDraftsAfterSend; - (BOOL) mailAttachTextDocumentsInline; - (NSArray *) mailListViewColumnsOrder; +- (BOOL) mailCertificateEnabled; - (BOOL) aclSendEMailNotifications; - (BOOL) appointmentSendEMailNotifications; diff --git a/SoObjects/SOGo/SOGoDomainDefaults.m b/SoObjects/SOGo/SOGoDomainDefaults.m index 19ac495a5..41e21f53b 100644 --- a/SoObjects/SOGo/SOGoDomainDefaults.m +++ b/SoObjects/SOGo/SOGoDomainDefaults.m @@ -322,6 +322,11 @@ return [self stringArrayForKey: @"SOGoMailListViewColumnsOrder"]; } +- (BOOL) mailCertificateEnabled +{ + return [self boolForKey: @"SOGoMailCertificateEnabled"]; +} + - (NSArray *) superUsernames { return [self stringArrayForKey: @"SOGoSuperUsernames"]; diff --git a/UI/PreferencesUI/UIxAccountEditor.m b/UI/PreferencesUI/UIxAccountEditor.m index b5bd09f89..abba08d9e 100644 --- a/UI/PreferencesUI/UIxAccountEditor.m +++ b/UI/PreferencesUI/UIxAccountEditor.m @@ -1,6 +1,6 @@ /* UIxAccountEditor.m - this file is part of SOGo * - * Copyright (C) 2010-2017 Inverse inc. + * Copyright (C) 2010-2021 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +25,8 @@ #import #import +#import +#import #import @@ -55,6 +57,14 @@ [super dealloc]; } +- (BOOL) showSecurityOptions +{ + SOGoDomainDefaults *dd; + + dd = [[context activeUser] domainDefaults]; + + return [dd mailCertificateEnabled]; +} - (BOOL) _validateFilterId { diff --git a/UI/Templates/PreferencesUI/UIxAccountEditor.wox b/UI/Templates/PreferencesUI/UIxAccountEditor.wox index c562e32d7..eec003348 100644 --- a/UI/Templates/PreferencesUI/UIxAccountEditor.wox +++ b/UI/Templates/PreferencesUI/UIxAccountEditor.wox @@ -238,6 +238,7 @@ + @@ -345,6 +346,7 @@ +