Bug 1174505 - thunderbird OAuth2 POP access should not offer OAuth2. r=rkent, a=rkent
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 01 Jul 2015 23:27:46 +0300
changeset 26238 9f0be9a6369df799d3d773af2ce25622c17b0c2c
parent 26237 6afc64f15c3ccc91ff576435f33fa4c1b3f24c8f
child 26239 c8208d887a84e7f31fd0368a6ea0ff029eee78c0
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrkent, rkent
bugs1174505
Bug 1174505 - thunderbird OAuth2 POP access should not offer OAuth2. r=rkent, a=rkent
mailnews/base/prefs/content/am-server.js
--- a/mailnews/base/prefs/content/am-server.js
+++ b/mailnews/base/prefs/content/am-server.js
@@ -21,19 +21,22 @@ function onSave()
 function onInit(aPageId, aServerId)
 {
   initServerType();
 
   onCheckItem("server.biffMinutes", ["server.doBiff"]);
   onCheckItem("nntp.maxArticles", ["nntp.notifyOn"]);
   setupMailOnServerUI();
   setupFixedUI();
-  if (document.getElementById("server.type").getAttribute("value") == "imap")
+  let serverType = document.getElementById("server.type").getAttribute("value");
+  if (serverType == "imap")
     setupImapDeleteUI(aServerId);
 
+  document.getElementById("authMethod-oauth2").hidden = (serverType != "imap");
+
   // "STARTTLS, if available" is vulnerable to MITM attacks so we shouldn't
   // allow users to choose it anymore. Hide the option unless the user already
   // has it set.
   hideUnlessSelected(document.getElementById("connectionSecurityType-1"));
 
   // UI for account store type.
   let storeTypeElement = document.getElementById("server.storeTypeMenulist");
   // set the menuitem to match the account