How to force existing profiles to load policies.json settings
I am a bit confused with the workflow of policies.json feature and I don't find much detailed documentation on this topic...
My main question is:
When a User edits its own Preferences (from about:preferences) which updates the settings of policies.json is there a way to "reset" them back into the default ones (of the policies.json)?
Additional System Details
- User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Both are located in the Firefox installation directory, so they will be applied to any profile that loads that version of Firefox. Where they differ is how they work.
The policies.json is used to control certain functionality. For example, you could use it to disable Private Browsing mode. If the policy that you are using has an associated preference related to it, the user shouldn't be able to change that.
For example, setting the homepage using policies.json will mean that the preference on the settings page is locked and the user can't change it. There is a full list of the policies published on here.
The AutoConfig gives you a little more flexibility. That allows you to control anything listed in the
about:config preferences. You could lock the preference so that it can't be changed. You could set the default so that it resets to a different value. There's a little more control that way.
If you lock a preference, generally it will also lock the associated setting listed on the regular Firefox settings page, but not always. It depends on what you are trying to lock.
Generally speaking, it's easier to lock stuff using the policies.json file, if what you are trying to do is listed there.
But to answer your main question, the user shouldn't be able to modify things that are controlled using policies.json as long as it's correctly configured.
Hope this helps.
Note that a policies.json file is used globally and affects all profiles that are started with the Firefox version that contains this file, both existing profiles and new profiles.