Bug 1072748 - Switch Thunderbird from xpinstall.whitelist.add to using a default permissions file. r+a=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 07 Nov 2018 12:34:21 +0200
changeset 33520 1376227af5a90240ebbdea18a89bb6a68d3d9db3
parent 33519 2bc79ecf12c5ea75fe3f3b642807efece7d4f092
child 33521 f39e51011ff40923019532de40e1422d4af3b04a
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
bugs1072748, 506446, 1050080, 1224000
Bug 1072748 - Switch Thunderbird from xpinstall.whitelist.add to using a default permissions file. r+a=jorgk - port bug 506446 (use default_permissions file) - port bug 1050080 (remove xpinstall.whitelist.add) - port bug 1224000 - browser/omni.ja doesn't contain startup cache anymore and resource://app/ doesn't point where it's supposed to
mail/app/permissions
mail/app/profile/all-thunderbird.js
mail/installer/package-manifest.in
mail/moz.build
new file mode 100644
--- /dev/null
+++ b/mail/app/permissions
@@ -0,0 +1,10 @@
+# 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	https://addons.thunderbird.net
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -198,17 +198,18 @@ pref("extensions.dss.switchPending", fal
 
 pref("extensions.webextensions.themes.icons.buttons", "getmsg,newmsg,address,reply,replyall,replylist,forwarding,delete,junk,print,stop,file,nextUnread,prevUnread,mark,tag,back,forward,compact,archive,chat,nextMsg,prevMsg,QFB,conversation,app_menu,newcard,newlist,editcard,newim,send,spelling,attach,security,save,quote,cut,copy,paste,buddy,join_chat,chat_accounts,calendar,tasks,synchronize,newevent,newtask,editevent,today,find,category,complete,priority,saveandclose,attendees,privacy,status,freebusy,timezones");
 pref("extensions.webextensions.themes.enabled", true);
 
 pref("lightweightThemes.selectedThemeID", "default-theme@mozilla.org", sticky);
 
 pref("lightweightThemes.update.enabled", true);
 
-pref("xpinstall.whitelist.add", "addons.thunderbird.net");
+// Built-in default permissions.
+pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions");
 
 pref("general.smoothScroll", true);
 #ifdef UNIX_BUT_NOT_MAC
 pref("general.autoScroll", false);
 #else
 pref("general.autoScroll", true);
 #endif
 
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -317,16 +317,17 @@
 ; default pref files
 @RESPATH@/defaults/pref/all-thunderbird.js
 @RESPATH@/defaults/pref/channel-prefs.js
 @RESPATH@/defaults/pref/composer.js
 @RESPATH@/defaults/pref/mailnews.js
 @RESPATH@/defaults/pref/mdn.js
 @RESPATH@/defaults/pref/smime.js
 @RESPATH@/defaults/pref/thunderbird-branding.js
+@RESPATH@/defaults/permissions
 @RESPATH@/defaults/settings/blocklists
 @RESPATH@/defaults/settings/pinning
 @RESPATH@/defaults/settings/main
 @RESPATH@/greprefs.js
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; App extensions to Mail
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- a/mail/moz.build
+++ b/mail/moz.build
@@ -18,8 +18,9 @@ DIRS += [
 if CONFIG['MAKENSISU']:
     DIRS += ['installer/windows']
 
 if CONFIG['MOZ_BUNDLED_FONTS']:
     DIRS += ['/%s/browser/fonts' % CONFIG['mozreltopsrcdir']]
 
 TEST_DIRS += ['test/mozmill']
 
+FINAL_TARGET_FILES.defaults += ['app/permissions']