How To Add More Than One Policy?
-
- Posts: 21
- Joined: March 14th, 2009, 10:31 am
How To Add More Than One Policy?
It's simple enough to add a policy but how do you add more than one?
-
- Posts: 6403
- Joined: February 3rd, 2009, 6:29 pm
Re: How To Add More Than One Policy?
Do you mean adding multiple policies using the policies.json file?
Example:
More info: http://forums.mozillazine.org/viewtopic ... &t=3057471
Example:
Code: Select all
{
"policies": {
"DontCheckDefaultBrowser": true,
"Homepage": {
"StartPage": "homepage",
"URL": "https://www.google.com/"
},
"NewTabPage": true
}
}
Last edited by morat on September 21st, 2021, 10:25 pm, edited 1 time in total.
- jscher2000
- Posts: 11742
- Joined: December 19th, 2004, 12:26 am
- Location: Silicon Valley, CA USA
- Contact:
Re: How To Add More Than One Policy?
The policies.json file uses JSON notation: https://www.w3schools.com/js/js_json_syntax.asp
In JSON, different properties of the object are separated by commas. These properties can themselves be objects. As an example that includes multiple policies, some of which are objects and some of which are just values, see:
https://github.com/mozilla/policy-templ ... ciesjson-3
In JSON, different properties of the object are separated by commas. These properties can themselves be objects. As an example that includes multiple policies, some of which are objects and some of which are just values, see:
https://github.com/mozilla/policy-templ ... ciesjson-3
-
- Posts: 21
- Joined: March 14th, 2009, 10:31 am
Re: How To Add More Than One Policy?
Thank you both.
You've given me something to scratch my head over.
You've given me something to scratch my head over.
- dickvl
- Posts: 54145
- Joined: July 18th, 2005, 3:25 am
Re: How To Add More Than One Policy?
You can separate multiple policy rules by a comma.
There shouldn't be a comma directly before a closing bracket (}).
You can open a JSON file in a Firefox tab to let the built-in JSON viewer validate and display the file.
There shouldn't be a comma directly before a closing bracket (}).
You can open a JSON file in a Firefox tab to let the built-in JSON viewer validate and display the file.
-
- Posts: 21
- Joined: March 14th, 2009, 10:31 am
Re: How To Add More Than One Policy?
Thanks, that's something else I didn't know.