Bug 1447051 - about:preferences should not offer to Preview PDFs when the DisableBuiltinPDFViewer policy is active
MozReview-Commit-ID: B2R6SUbAyXP
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -3514,11 +3514,12 @@ InternalHandlerInfoWrapper.prototype = {
}
};
var pdfHandlerInfo = {
__proto__: new InternalHandlerInfoWrapper(TYPE_PDF),
_handlerChanged: TOPIC_PDFJS_HANDLER_CHANGED,
_appPrefLabel: "portableDocumentFormat",
get enabled() {
- return !Services.prefs.getBoolPref(PREF_PDFJS_DISABLED);
+ return !Services.prefs.getBoolPref(PREF_PDFJS_DISABLED) &&
+ Services.policies.isAllowed("PDF.js");
},
};