зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1429161 - Policy: Disable Forget Button. r=jaws
This commit is contained in:
Родитель
3bb7a4c400
Коммит
a1016b0241
|
@ -804,6 +804,7 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
|
|||
id: "panic-button",
|
||||
type: "view",
|
||||
viewId: "PanelUI-panicView",
|
||||
disabled: !Services.policies.isAllowed("panicButton"),
|
||||
|
||||
forgetButtonCalled(aEvent) {
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
|
|
|
@ -257,6 +257,14 @@ var Policies = {
|
|||
}
|
||||
},
|
||||
|
||||
"DisableForgetButton": {
|
||||
onProfileAfterChange(manager, param) {
|
||||
if (param) {
|
||||
manager.disallowFeature("panicButton");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"DisableFormHistory": {
|
||||
onBeforeUIStartup(manager, param) {
|
||||
if (param) {
|
||||
|
|
|
@ -206,6 +206,13 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
|
||||
"DisableForgetButton": {
|
||||
"description": "Prevents access to the \"Forget\" button.",
|
||||
"first_available": "60.0",
|
||||
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
"DisableFormHistory": {
|
||||
"description": "Don't remember search and form history.",
|
||||
"first_available": "60.0",
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[DEFAULT]
|
||||
prefs =
|
||||
browser.policies.alternatePath='<test-root>/browser/components/enterprisepolicies/tests/browser/disable_forget_button/forget_button.json'
|
||||
support-files =
|
||||
forget_button.json
|
||||
|
||||
[browser_policy_disable_forgetbutton.js]
|
|
@ -0,0 +1,9 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(async function test_policy_disable_forget_button() {
|
||||
let widget = CustomizableUI.getWidget("panic-button");
|
||||
is(widget.disabled, true, "Forget Button is disabled");
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"policies": {
|
||||
"DisableForgetButton": true
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ BROWSER_CHROME_MANIFESTS += [
|
|||
'browser/disable_app_update/browser.ini',
|
||||
'browser/disable_default_bookmarks/browser.ini',
|
||||
'browser/disable_developer_tools/browser.ini',
|
||||
'browser/disable_forget_button/browser.ini',
|
||||
'browser/disable_fxscreenshots/browser.ini',
|
||||
]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче