mozilla-bmo1464766.patch
changeset 1060 5ce9d1f6be41
parent 1059 936bf8851c57
equal deleted inserted replaced
1059:936bf8851c57 1060:5ce9d1f6be41
     1 
     1 
     2 # HG changeset patch
     2 # HG changeset patch
     3 # User Mike Hommey <mh+mozilla@glandium.org>
     3 # User Mike Hommey <mh+mozilla@glandium.org>
     4 # Date 1527491713 -32400
     4 # Date 1527491713 -32400
     5 # Node ID c28becad0c10b906454d7e424f9a9402799ea8dd
     5 # Node ID c28becad0c10b906454d7e424f9a9402799ea8dd
     6 # Parent  182b06bb5c20188d320db4d14767e0e39366617a
     6 # Parent  86eaa6799cf51660c0b598937121305b8f70c84d
     7 Bug 1464766 - Allow to relax the addon signature requirements. r?rhelmer
     7 Bug 1464766 - Allow to relax the addon signature requirements. r?rhelmer
     8 
     8 
     9 diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
     9 diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
    10 --- a/modules/libpref/init/all.js
    10 --- a/modules/libpref/init/all.js
    11 +++ b/modules/libpref/init/all.js
    11 +++ b/modules/libpref/init/all.js
    17  // maximum number of misspelled words that will be underlined
    17  // maximum number of misspelled words that will be underlined
    18  // in a document.
    18  // in a document.
    19  pref("extensions.spellcheck.inline.max-misspellings", 500);
    19  pref("extensions.spellcheck.inline.max-misspellings", 500);
    20  
    20  
    21 +// Add-on manager scoped allowing unsigned addons. None by default.
    21 +// Add-on manager scoped allowing unsigned addons. None by default.
    22 +pref("extensions.unsignedScopes", 0, locked);
    22 +pref("extensions.unsignedScopes", 12, locked);
    23 +
    23 +
    24  // Prefs used by libeditor. Prefs specific to seamonkey composer
    24  // Prefs used by libeditor. Prefs specific to seamonkey composer
    25  // belong in comm-central/editor/ui/composer.js
    25  // belong in comm-central/editor/ui/composer.js
    26  
    26  
    27  pref("editor.use_custom_colors", false);
    27  pref("editor.use_custom_colors", false);
   105     *        True if the add-on should not be appDisabled
   105     *        True if the add-on should not be appDisabled
   106     */
   106     */
   107    isUsableAddon(aAddon) {
   107    isUsableAddon(aAddon) {
   108 -    if (this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
   108 -    if (this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
   109 +    let unsignedScopes = Services.prefs.getIntPref(PREF_EM_UNSIGNED_SCOPES, 0);
   109 +    let unsignedScopes = Services.prefs.getIntPref(PREF_EM_UNSIGNED_SCOPES, 0);
   110 +    if (!(aAddon.location.scope & unsignedScopes) &&
   110 +    if (!(aAddon._installLocation.scope & unsignedScopes) &&
   111 +        this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
   111 +        this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
   112        logger.warn(`Add-on ${aAddon.id} is not correctly signed.`);
   112        logger.warn(`Add-on ${aAddon.id} is not correctly signed.`);
   113        if (Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false)) {
   113        if (Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false)) {
   114          logger.warn(`Preference ${PREF_XPI_SIGNATURES_DEV_ROOT} is set.`);
   114          logger.warn(`Preference ${PREF_XPI_SIGNATURES_DEV_ROOT} is set.`);
   115        }
   115        }