Commit ef19b4d6 authored by Kanika Saini's avatar Kanika Saini
Browse files

Bug 1469943 - Enterprise policy to set a custom app update URL. r=felipe

parent f2554511
......@@ -61,6 +61,12 @@ var EXPORTED_SYMBOLS = ["Policies"];
* The callbacks will be bound to their parent policy object.
*/
var Policies = {
"AppUpdateURL": {
onBeforeAddons(manager, param) {
setDefaultPref("app.update.url", param.href);
}
},
"Authentication": {
onBeforeAddons(manager, param) {
if ("SPNEGO" in param) {
......
......@@ -2,6 +2,12 @@
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"AppUpdateURL": {
"description": "Sets custom app update server URL.",
"machine_only": true,
"type": "URL"
},
"Authentication": {
"description": "Sites that support integrated authentication. See https://developer.mozilla.org/en-US/docs/Mozilla/Integrated_authentication",
......
......@@ -20,6 +20,7 @@ support-files =
[browser_policies_simple_pref_policies.js]
[browser_policies_sorted_alphabetically.js]
[browser_policy_app_update.js]
[browser_policy_app_update_URL.js]
[browser_policy_block_about_addons.js]
[browser_policy_block_about_config.js]
[browser_policy_block_about_profiles.js]
......
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
add_task(async function test_app_update_URL() {
await setupPolicyEngineWithJson({
"policies": {
"AppUpdateURL": "https://www.example.com/"
}
});
is(Services.policies.status, Ci.nsIEnterprisePolicies.ACTIVE, "Engine is active");
let expected = Services.prefs.getStringPref("app.update.url", undefined);
is("https://www.example.com/", expected, "Correct app update URL");
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment