Commit eb4b0ebf authored by Felipe Gomes's avatar Felipe Gomes
Browse files

Bug 1429161. Policy follow-up: hide instead of disabling the Forget button. r=jaws

parent 811f83e6
...@@ -804,7 +804,6 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) { ...@@ -804,7 +804,6 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
id: "panic-button", id: "panic-button",
type: "view", type: "view",
viewId: "PanelUI-panicView", viewId: "PanelUI-panicView",
disabled: !Services.policies.isAllowed("panicButton"),
forgetButtonCalled(aEvent) { forgetButtonCalled(aEvent) {
let doc = aEvent.target.ownerDocument; let doc = aEvent.target.ownerDocument;
......
...@@ -260,7 +260,7 @@ var Policies = { ...@@ -260,7 +260,7 @@ var Policies = {
"DisableForgetButton": { "DisableForgetButton": {
onProfileAfterChange(manager, param) { onProfileAfterChange(manager, param) {
if (param) { if (param) {
manager.disallowFeature("panicButton"); setAndLockPref("privacy.panicButton.enabled", false);
} }
} }
}, },
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
add_task(async function test_policy_disable_forget_button() { add_task(async function test_policy_disable_forget_button() {
let widget = CustomizableUI.getWidget("panic-button"); let widget = CustomizableUI.getWidget("panic-button");
is(widget.disabled, true, "Forget Button is disabled"); isnot(widget.type, "view", "Forget Button was not created");
}); });
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