Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-16489: Add LDAP Attributes for zimbra_external_warning_message #1700

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

viditZim
Copy link
Contributor

@viditZim viditZim commented Feb 7, 2025

https://synacor.atlassian.net/browse/ZCS-16489

Problem: Move External Email Warning attributes from LC to LDAP.

Solution: Created 2 LDAP attributes:-

  1. zimbraFeatureExternalEmailWarningEnabled - Boolean attribute to enable/disable the feature. At domain/globalConfig level with default value as FALSE.
  2. zimbraExternalEmailWarningMessage - String attribute containing base warning text for EEW at domain/globalConfig level.

Modified conditions to check whether the feature is enabled for each recipient account's domain and fetch EEW message to append in the message.

@@ -68,8 +73,23 @@ public static ExternalEmailWarning getInstance() {
*
* @return true if EEW feature is enabled.
*/
public boolean isEnabled() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete this public method? you already got the override methods that you need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've deleted it because it will no longer be called anywhere, I've replaced all the usages with the below methods.

@viditZim viditZim force-pushed the ZCS-16489 branch 4 times, most recently from c09f75f to 44f454c Compare February 13, 2025 11:15
@shrutig0510
Copy link
Contributor

The existing LC zimbra_external_email_warning_enabled and zimbra_external_email_warning_message if unused should be removed.

@viditZim viditZim marked this pull request as ready for review February 17, 2025 04:06
…bled and modified condition to check for feature enabled

Unit tests added for EEW
Refactored code to store the flag and accounts to avoid multiple LDAP calls

modified LDAP attrs at domain/globalConfig

Modified delivery methods to create different blobs for each recipient

modified flags for LDAP attrs
Unit tests updated and deprecated LC

Updated LDAP attrs id

Modified conditions to reduce number of LDAP queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants