Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
Tor Browser
Commits
ef19b4d6
Commit
ef19b4d6
authored
Jul 12, 2018
by
Kanika Saini
Browse files
Bug 1469943 - Enterprise policy to set a custom app update URL. r=felipe
parent
f2554511
Changes
4
Hide whitespace changes
Inline
Side-by-side
browser/components/enterprisepolicies/Policies.jsm
View file @
ef19b4d6
...
...
@@ -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) {
...
...
browser/components/enterprisepolicies/schemas/policies-schema.json
View file @
ef19b4d6
...
...
@@ -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"
,
...
...
browser/components/enterprisepolicies/tests/browser/browser.ini
View file @
ef19b4d6
...
...
@@ -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]
...
...
browser/components/enterprisepolicies/tests/browser/browser_policy_app_update_URL.js
0 → 100644
View file @
ef19b4d6
/* 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
"
);
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment