Closed Bug 1996449 Opened 1 month ago Closed 1 month ago

DisplayMenuBar enterprise policy overrides user choice

Categories

(Firefox :: Enterprise Policies, defect)

Firefox 144
defect

Tracking

()

VERIFIED FIXED
146 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox144 --- wontfix
firefox145 --- wontfix
firefox146 --- verified
firefox147 --- verified

People

(Reporter: k4sum1, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

Make a distribution\policies.json file in Firefox install directory.
Add these contents

{
    "policies": {
        "DisplayMenuBar": true
    }
}

Start web browser
Disable menu bar
Close web browser
Start web browser

Actual results:

The menu bar shows again even though the user disabled it.

Expected results:

The menu bar should stay disabled.

The Bugbug bot thinks this bug should belong to the 'Firefox::Enterprise Policies' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Enterprise Policies

I'm pretty sure this commit is the cause of the issue, but I haven't explicitly tested reverting it.
https://github.com/mozilla-firefox/firefox/commit/0aa2101448acfbcb1f040301efda15428abce5ff
https://hg-edge.mozilla.org/mozilla-central/rev/98bcb3a4ff0a

I can say this is the first build to have the issue, and this build is the first to have that commit.
https://archive.mozilla.org/pub/firefox/nightly/2025/07/2025-07-29-21-04-51-mozilla-central/

Component: Enterprise Policies → Untriaged
Component: Untriaged → Enterprise Policies

I don't know why sending a comment Untriaged the bug, so I added it back to Enterprise Policies

I discovered default-on is also valid for DisplayMenuBar, and I tested it, and thought oh they changed the behavior for true and default-on works, but no, I need to add quotes around "default-on" for it to work in the policies.json, and it also shows the issue here when set.

I finally got around to testing it, and yes this commit is the issue.

runOncePerModification works on strings. If you pass a boolean down it
will always call its callback (because "true" != true etc).

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Regressed by: 1979014

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

I sent this on Matrix, but I'll also send it here. Applying this patch fixes the issue. Thank you.

Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0df9ebba38e6 https://hg.mozilla.org/integration/autoland/rev/2c05e0d5a24d Ensure runOncePerModification("displayMenuBar", ..) works as expected. r=mkaply,mossop
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/692919af61da https://hg.mozilla.org/integration/autoland/rev/5c2eeca67079 Revert "Bug 1996449 - Ensure runOncePerModification("displayMenuBar", ..) works as expected. r=mkaply,mossop" for causing bc failures @browser_policy_display_menu.js.

Backed out for causing bc failures @browser_policy_display_menu.js.

Flags: needinfo?(emilio)

On macOS we have the native menubar so we can't hide it. I'll reland with the subtest effectively skipped there.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eae85737b795 https://hg.mozilla.org/integration/autoland/rev/8512344cba25 Ensure runOncePerModification("displayMenuBar", ..) works as expected. r=mkaply,mossop
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
QA Whiteboard: [qa-ver-opt-c147/b146][qa-triage-done-c147/b146]

Reproducible on a 2025-10-26 Firefox Nightly build on Windows 10.

Verified as fixed on Firefox Nightly 147.0a1 and Firefox 146.0b5 on Windows 10 and Ubuntu 22.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-ver-opt-c147/b146][qa-triage-done-c147/b146] → [qa-ver-done-c147/b146][qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: