Issue #968 - Preload the permissions manager with permissions file

This commit is contained in:
Matt A. Tobin 2019-05-09 16:57:05 -04:00 committed by Roy Tam
commit 37f0839a64
4 changed files with 19 additions and 3 deletions

View file

@ -20,6 +20,7 @@ if CONFIG['LIBXUL_SDK']:
SOURCES += ['nsBrowserApp.cpp']
FINAL_TARGET_FILES += ['blocklist.xml']
FINAL_TARGET_FILES.defaults += ['permissions']
FINAL_TARGET_FILES.defaults.profile += ['profile/prefs.js']
DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']

View file

@ -0,0 +1,14 @@
# This file has default permissions for the permission manager.
# The file-format is strict:
# * matchtype \t type \t permission \t host
# * "origin" should be used for matchtype, "host" is supported for legacy reasons
# * type is a string that identifies the type of permission (e.g. "cookie")
# * permission is an integer between 1 and 15
# See nsPermissionManager.cpp for more...
# XPInstall
origin install 1 http://www.palemoon.org
origin install 1 https://www.palemoon.org
origin install 1 http://addons.palemoon.org
origin install 1 https://addons.palemoon.org

View file

@ -206,9 +206,6 @@ pref("extensions.dss.switchPending", false); // Non-dynamic switch pending af
pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser/locale/browser.properties");
pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties");
pref("xpinstall.whitelist.add", "addons.mozilla.org,www.palemoon.org,addons.palemoon.org");
pref("xpinstall.whitelist.add.36", "");
pref("xpinstall.whitelist.add.180", "");
pref("xpinstall.whitelist.required", false);
// Allow installing XPI add-ons by direct URL requests (no referrer)
pref("xpinstall.whitelist.directRequest", true);
@ -1103,6 +1100,9 @@ pref("full-screen-api.enabled", true);
// 0-100 (currently)
pref("permissions.places-sites-limit", 50);
// Built-in default permissions.
pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions");
// Startup Crash Tracking
// number of startup crashes that can occur before starting into safe mode automatically
// (this pref has no effect if more than 6 hours have passed since the last crash)

View file

@ -231,6 +231,7 @@
; [Default Preferences]
; All the pref files must be part of base to prevent migration bugs
@RESPATH@/browser/defaults/permissions
@RESPATH@/browser/@PREF_DIR@/palemoon.js
@RESPATH@/browser/@PREF_DIR@/palemoon-branding.js
@RESPATH@/greprefs.js