summaryrefslogtreecommitdiffstats
path: root/mailnews/base/prefs/content/am-server.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-05 18:27:14 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-05 18:27:14 -0500
commit03590a6711d601ef3ddb48787e9f3f556705b5db (patch)
treeb5985c23741cd03fd0ed32537773e07db2d7d21d /mailnews/base/prefs/content/am-server.js
parent714afc76f690ba11e77330e067e5bce486292831 (diff)
downloadUXP-03590a6711d601ef3ddb48787e9f3f556705b5db.tar
UXP-03590a6711d601ef3ddb48787e9f3f556705b5db.tar.gz
UXP-03590a6711d601ef3ddb48787e9f3f556705b5db.tar.lz
UXP-03590a6711d601ef3ddb48787e9f3f556705b5db.tar.xz
UXP-03590a6711d601ef3ddb48787e9f3f556705b5db.zip
Issue #1258 - Part 8: Ifdef MailNews OAuth2 Support
Use --disable-mailnews-oauth2 to exclude it. Confvars won't be respected.
Diffstat (limited to 'mailnews/base/prefs/content/am-server.js')
-rw-r--r--mailnews/base/prefs/content/am-server.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/mailnews/base/prefs/content/am-server.js b/mailnews/base/prefs/content/am-server.js
index e3c2d2b09..01b22e4ae 100644
--- a/mailnews/base/prefs/content/am-server.js
+++ b/mailnews/base/prefs/content/am-server.js
@@ -31,7 +31,9 @@ function onInit(aPageId, aServerId)
setupImapDeleteUI(aServerId);
// TLS Cert (External) and OAuth2 are only supported on IMAP.
+#ifdef MOZ_MAILNEWS_OAUTH2
document.getElementById("authMethod-oauth2").hidden = (serverType != "imap");
+#endif
document.getElementById("authMethod-external").hidden = (serverType != "imap");
// "STARTTLS, if available" is vulnerable to MITM attacks so we shouldn't
@@ -83,7 +85,9 @@ function initServerType()
setLabelFromStringBundle("authMethod-kerberos", "authKerberos");
setLabelFromStringBundle("authMethod-external", "authExternal");
setLabelFromStringBundle("authMethod-ntlm", "authNTLM");
+#ifdef MOZ_MAILNEWS_OAUTH2
setLabelFromStringBundle("authMethod-oauth2", "authOAuth2");
+#endif
setLabelFromStringBundle("authMethod-anysecure", "authAnySecure");
setLabelFromStringBundle("authMethod-any", "authAny");
setLabelFromStringBundle("authMethod-password-encrypted",