Clear policy-set default value after policy removal when no cached default value exists
Categories
(Firefox Enterprise :: Client, defect, P1)
Tracking
(Not tracked)
People
(Reporter: janika, Assigned: janika)
References
(Blocks 3 open bugs)
Details
Attachments
(1 file)
When a policy is modifying a preference's default value, we save the preference's default and user value in savePreferenceState. When the policy is removed, we restore the preference's default and user value in restorePreferenceState. But we currently only restore a previous value state if a previous one existed, hence a policy-set default can survive the policy removal if there is no value to restore.
This issue highlights the question of what preference state is expected after a policy removal. Some exemplary cases:
- A policy sets a preference's default value and locks it --> We restore both the default and user value of that preference.
- A policy set a preference's default value and doesn't lock it. --> We restore only the default value of that preference.
- A policy sets the preference's user value. --> We restore the user value. (That's currently not supported as we only cache the preference state when the default value is changed)
Updated•14 days ago
|
| Assignee | ||
Comment 1•8 days ago
|
||
Additional limitation: cache does not survive a restart
_initialPrefState is in-memory only, but policy-driven user value changes (via Services.prefs.setXXX) or any policy-unrelated user value changes are persisted to disk. Once the browser is restarted, the cached "previous state" is gone, so the original value can no longer be restored.
Comment 2•2 days ago
|
||
Comment 3•12 hours ago
|
||
Authored by https://github.com/1rneh
https://github.com/mozilla/enterprise-firefox/commit/2e9d52ee4272506e91bca1fadf3e62da365063d9
[enterprise-main] Bug 2037867 - Clear policy-set default preference values (#925)
Description
•