Bug 1778559 - Just disable addon button if policy forbids extension installation. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D248342
This commit is contained in:
committed by
mozilla@kaply.com
parent
91dce4674b
commit
239f898fd3
@@ -1330,8 +1330,7 @@ export var Policies = {
|
||||
"extensions.htmlaboutaddons.recommendations.enable",
|
||||
false
|
||||
);
|
||||
// Block about:debugging
|
||||
blockAboutPage(manager, "about:debugging");
|
||||
manager.disallowFeature("installTemporaryAddon");
|
||||
}
|
||||
if ("restricted_domains" in extensionSettings["*"]) {
|
||||
let restrictedDomains = Services.prefs
|
||||
@@ -1661,7 +1660,7 @@ export var Policies = {
|
||||
if ("Default" in param) {
|
||||
setAndLockPref("xpinstall.enabled", param.Default);
|
||||
if (!param.Default) {
|
||||
blockAboutPage(manager, "about:debugging");
|
||||
manager.disallowFeature("installTemporaryAddon");
|
||||
setAndLockPref(
|
||||
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons",
|
||||
false
|
||||
|
||||
@@ -42,6 +42,7 @@ class TemporaryExtensionInstaller extends PureComponent {
|
||||
{
|
||||
className: `${className} default-button qa-temporary-extension-install-button`,
|
||||
onClick: () => this.install(),
|
||||
disabled: !Services.policies.isAllowed("installTemporaryAddon"),
|
||||
},
|
||||
"Load Temporary Add-on…"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user