Skip to content

Bug 2040302 - Disable primary password controls in the Settings Redesign for enterprise-managed profiles - #1176

Open
beurdouche wants to merge 1 commit into
mozilla:enterprise-mainfrom
beurdouche:bug-2040302-primary-password-settings-redesign
Open

Bug 2040302 - Disable primary password controls in the Settings Redesign for enterprise-managed profiles#1176
beurdouche wants to merge 1 commit into
mozilla:enterprise-mainfrom
beurdouche:bug-2040302-primary-password-settings-redesign

Conversation

@beurdouche

Copy link
Copy Markdown
Member

In enterprise builds the primary password is managed transparently and the user must not be able to add, change or remove it. The legacy about:preferences pane disables the controls imperatively in _initMasterPasswordUI(), but the Settings Redesign renders them through the declarative Preferences.addSetting() framework, whose disabled state is driven solely by each setting's disabled() callback.

The addPrimaryPassword, changePrimaryPassword and turnOffPrimaryPassword settings never consulted LoginHelper.isEnterpriseManagedPrimaryPassword(), so the redesign left them enabled. Add the enterprise check to those callbacks, restore it on the shared _initMasterPasswordUI() button (dropped in an earlier refactor), and cover the redesign behaviour with a browser-chrome test.

@lissyx
lissyx requested a review from gcp July 31, 2026 14:03
@lissyx lissyx added the branch:main PR that should be merged on enterprise-main branch label Jul 31, 2026
…ign for enterprise-managed profiles

In enterprise builds the primary password is managed transparently and the user
must not be able to add, change or remove it. The legacy about:preferences pane
disables the controls imperatively in _initMasterPasswordUI(), but the Settings
Redesign renders them through the declarative Preferences.addSetting() framework,
whose disabled state is driven solely by each setting's disabled() callback.

The addPrimaryPassword, changePrimaryPassword and turnOffPrimaryPassword settings
never consulted LoginHelper.isEnterpriseManagedPrimaryPassword(), so the redesign
left them enabled. Add the enterprise check to those callbacks, restore it on the
shared _initMasterPasswordUI() button (dropped in an earlier refactor), and cover
the redesign behaviour with a browser-chrome test.
@beurdouche
beurdouche force-pushed the bug-2040302-primary-password-settings-redesign branch from e189583 to 0190a80 Compare August 4, 2026 09:53
@beurdouche

beurdouche commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Rebased onto enterprise-main @ 5c1d1f8f (the branch was 3688 commits behind). The rebase was conflict-free and the diff is unchanged: 2 files, +66/-3.

CI failures look independent from the patch.

@beurdouche

Copy link
Copy Markdown
Member Author

Relinquished to @gcp as is for further modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:main PR that should be merged on enterprise-main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants