Bug 1428922 - Implement popups policy. r=mystor
MozReview-Commit-ID: IoBa82aAnJN
--- a/browser/components/enterprisepolicies/Policies.jsm
+++ b/browser/components/enterprisepolicies/Policies.jsm
@@ -64,16 +64,22 @@ this.Policies = {
}
},
"flash_plugin": {
onBeforeUIStartup(manager, param) {
PermissionPolicies.addAllowDenyPermissions("plugin:flash", param.allow, param.block);
}
},
+
+ "popups": {
+ onBeforeUIStartup(manager, param) {
+ PermissionPolicies.addAllowDenyPermissions("popup", param.allow, param.block);
+ }
+ },
};
function validateAndParseParamRecursive(param, properties) {
if (properties.enum) {
if (properties.enum.includes(param)) {
return [true, param];
}
return [false, null];
--- a/browser/components/enterprisepolicies/schemas/policies.json
+++ b/browser/components/enterprisepolicies/schemas/policies.json
@@ -44,11 +44,33 @@
"block": {
"type": "array",
"items": {
"type": "origin"
}
}
}
+ },
+
+ "popups": {
+ "description": "Allow or deny popup usage.",
+ "first_available": "60.0",
+
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "origin"
+ }
+ },
+
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "origin"
+ }
+ }
+ }
}
}
}