Closed Bug 1662183 Opened 4 years ago Closed 4 years ago

Sign in to Firefox menu is enabled even when DisableFirefoxAccounts policy is true

Categories

(Firefox :: Sync, defect)

Firefox 81
defect

Tracking

()

VERIFIED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox80 --- unaffected
firefox81 --- verified
firefox82 --- verified

People

(Reporter: jeanpaul, Assigned: emmamalysz)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached image not_disabled.png

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Enable Policy DisableFirefoxAccounts to true

Actual results:

The menu "Sign in to Firefox" is enabled with options to login, turn on sync, set up sync, send tabs to other devices ...

Expected results:

This menu should be removed.

Attached image not_disabled2.png
Component: Untriaged → Enterprise Policies

This is a regression that happened around the 10th or 11th of August. I'm still looking into it.

This is actually a sync bug. Some new code isn't handling the

identity.fxaccounts.enabled

preference when set to false.

Status: UNCONFIRMED → NEW
Component: Enterprise Policies → Sync
Ever confirmed: true
Has Regression Range: --- → yes

To recreate, put the following in a file called policies.json in bin/distribution

{
"policies": {
"DisableFirefoxAccounts": true
}
}

Just setting identity.fxaccounts.enabled to false and restarting should work as well.

Note that our test for this policy just tests that Sync is disabled, it doesn't test UI touchpoints.

Looking into this, here's the code that used to hide everything:

https://searchfox.org/mozilla-release/source/browser/base/content/browser-sync.js#1516

  onFxaDisabled() {
    const toHide = [...document.querySelectorAll(".sync-ui-item")];
    for (const item of toHide) {
      item.hidden = true;
    }
  },

That doesn't work because things are now lazy. Simplest fix might be to switch to CSS for hiding the items instead of using .hidden?

Assignee: nobody → emalysz

Set release status flags based on info from the regressing bug 1634030

See Also: → 1662506
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c0e35053e222
hide fxa button from main menu when identity.fxaccounts.enabled is false r=Gijs,mkaply
Flags: needinfo?(emalysz)
Pushed by abutkovits@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8838f9ba7f14
hide fxa button from main menu when identity.fxaccounts.enabled is false r=Gijs,mkaply
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Please nominate this for Beta approval.

Flags: needinfo?(emalysz)

Comment on attachment 9173279 [details]
Bug 1662183, hide fxa button from main menu when identity.fxaccounts.enabled is false

Beta/Release Uplift Approval Request

  • User impact if declined: Users with identity.fxaccounts.enabled will steel see fxa item in main menu.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open Firefox
  1. Set identity.fxaccounts.enabled
  2. Quit Firefox
  3. Open Firefox
  4. Click on the main hamburger menu
  5. Notice fxa button (first at top) is not there
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): No strings
  • String changes made/needed: n/a
Flags: needinfo?(emalysz)
Attachment #9173279 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9173279 [details]
Bug 1662183, hide fxa button from main menu when identity.fxaccounts.enabled is false

Approved for 81.0b9.

Attachment #9173279 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Confirmed that Sync is disabled for Windows 10 x64bit and MacOS 10.14 with latest Beta 81.0 (20200917005511) and Nightly 82.0a1 (20200917142508) by setting identity.fxaccounts.enabled to false. According to Comment 5 the UI is not covered here, should a new bug report be filed?

Flags: needinfo?(mozilla)

Are you still seeing UI anywhere? This should have all been fixed by this bug. Comment 5 was just pointing out the code where we were doing the work before.

Flags: needinfo?(mozilla)

On every tested build the menu is displayed like that after the Sync is disabled with the pref and the Firefox build is restarted.

OK, I don't see any Sync on that menu, so we should be fine. Might be worth opening a bug to remove the top separator though.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: