Commit Graph

43 Commits

Author SHA1 Message Date
Michael Kaply
0e0da366db Bug 1230802 - Add support for setting chrome.storage.managed via enterprise policy. r=Felipe,zombie,flod
Differential Revision: https://phabricator.services.mozilla.com/D21470
2019-03-07 17:31:38 +00:00
Michael Kaply
77bb8376e6 Bug 1527766 - Add enterprise policy for support menu. r=Felipe,flod
Differential Revision: https://phabricator.services.mozilla.com/D19722
2019-02-14 23:25:08 +00:00
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Ferenc Nagy
2c01d973a9 Bug 1497928 - Make about:policies report an error if json doesn't contain a 'policies' object. r=felipe 2018-12-18 18:23:18 -02:00
Coroiu Cristina
6e31a6fd5a Backed out 2 changesets (bug 1497928, bug 1494598) for browser-chrome failures at browser/components/enterprisepolicies/tests/browser/browser_policies_macosparser_unflatten.js on a CLOSED TREE
Backed out changeset 58cd47fe1774 (bug 1494598)
Backed out changeset 425ac2d14a27 (bug 1497928)
2018-12-19 00:02:14 +02:00
Ferenc Nagy
b40874f40d Bug 1497928 - Make about:policies report an error if json doesn't contain a 'policies' object. r=felipe 2018-12-18 18:23:18 -02:00
Michael Kaply
2e76682567 Bug 1507291 - Remove concept of machine_only policies. r=Felipe,flod
Differential Revision: https://phabricator.services.mozilla.com/D11942
2018-11-15 20:30:03 +00:00
Narcis Beleuzu
6ebe1dfa22 Backed out changeset 49bac5821786 (bug 1507291) for Linting failure on WindowsGPOParser.jsm. CLOSED TREE 2018-11-15 22:23:32 +02:00
Michael Kaply
4cc52db164 Bug 1507291 - Remove concept of machine_only policies. r=Felipe,flod
Differential Revision: https://phabricator.services.mozilla.com/D11942
2018-11-15 20:02:52 +00:00
Felipe Gomes
b2876b3428 Bug 1498032 - Part 0. Move the removeUnknownPolicies function into macOSPoliciesParser.jsm. r=spohl
This just simplifies things a bit for the next patch

Differential Revision: https://phabricator.services.mozilla.com/D8301
2018-10-11 19:07:50 +00:00
Michael Kaply
dc8194ec8d Bug 1493249 - Add policy for security devices. r=Felipe
Differential Revision: https://phabricator.services.mozilla.com/D6525
2018-10-02 03:47:17 +00:00
Stephen A Pohl
303be65e7d Bug 1445943: Fix ES lint error on inbound due to a missing comma and macOS test failures. r=me CLOSED TREE 2018-09-27 23:54:18 -04:00
Stephen A Pohl
d6736fdb75 Bug 1445943: Add Enterprise Policy support for macOS. r=mstange,felipe,glandium 2018-09-27 23:08:07 -04:00
Felipe Gomes
0de08f053e Bug 1470324 - Clean up some unused code in EnterprisePoliciesContent.js. r=kmag
There was some unused code in this file which was wasting memory.

This patch also avoids some more policies from being sent to the content process as they are not really needed there

MozReview-Commit-ID: C4FzesWMQi0
2018-07-27 14:51:12 -03:00
Felipe Gomes
4801e5ef79 Bug 1470324 - Use sharedData instead of initialProcessData in the enterprise policies code. r=kmag
This significantly simplifies the content-side implementation of the enterprise policies code since it doesn't have to listen for updates on the disallowed features list (with that, it also doesn't need to load early in order to set up those listeners)

MozReview-Commit-ID: 3lyZXq1j3D5
2018-07-27 14:51:10 -03:00
Kanika Saini
246bae3c77 Bug 1465950 - Keep parsed policies stored by EnterprisePolicies.js to display them on about:policies page. r=felipe 2018-06-20 22:48:12 +05:30
Andreea Pavel
00aca2c161 Backed out changeset ce5b67578d0c (bug 1465950) for failing eslint at /builds/worker/checkouts/gecko/browser/components/enterprisepolicies/tests/browser/browser_policies_getActivePolicies.js on a CLOSED TREE 2018-06-27 20:24:23 +03:00
Kanika Saini
8578233ee4 Bug 1465950 - Keep parsed policies stored by EnterprisePolicies.js to display them on about:policies page. r=felipe 2018-06-20 22:48:12 +05:30
Gurzau Raul
7cbbb8a25b Backed out changeset 04352a50d097 (bug 1465950) for linting failure on /enterprisepolicies/tests/browser/browser_policies_getActivePolicies.js on a CLOSED TREE 2018-06-27 06:55:53 +03:00
Kanika Saini
c898eea1db Bug 1465950 - Keep parsed policies stored by EnterprisePolicies.js to display them on about:policies page. r=felipe 2018-06-20 22:48:12 +05:30
Felipe Gomes
60b570dbeb Bug 1463895 - Allow some policies to be machine-only. r=mkaply
Machine-only policies can only be triggered from sources that require user privileges to make machine-wide changes. Currently, that means the policies.json file in the installation folder, or the HKEY_LOCAL_MACHINE registry root. In other words, it currently excludes the HKEY_CURRENT_USER registry root

MozReview-Commit-ID: G9wxEM19yVb
2018-05-28 18:35:15 -03:00
Kirk Steuber
06aa60f14a Bug 1460086 - Disable pref: browser.policies.alternatePath except in testing and Nightly r=Felipe,mkaply
MozReview-Commit-ID: GA5Ntp7izPl
2018-05-22 14:54:25 -07:00
Kris Maglione
fd7e9e6a69 Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY
2018-04-22 20:55:06 -07:00
Mike Cooper
9fecd96bd2 Bug 1440782 Part 1 - Move PolicyEngine's JSON schema validator to toolkit r=Felipe
MozReview-Commit-ID: 41K9xzry21w
2018-04-17 16:36:05 -07:00
Felipe Gomes
81194126ca Bug 1433172 - Drop the pref that controls the policy engine. r=mossop
The policy engine should always be enabled, with no way to disable it.

MozReview-Commit-ID: 9HGew1S33q1
2018-03-21 13:28:06 -03:00
Kirk Steuber
ffddeb1458 Bug 1436851 - Create an enterprise policy to disable system addon updates r=Felipe
MozReview-Commit-ID: AzxFGpFvxtm
2018-02-12 10:48:18 -08:00
Felipe Gomes
b1327a0095 Bug 1436840 - Policy engine: Add support for enterprise-only policies. r=mkaply
Policies annotated with enterprise_only in the schema will only be allowed to run on ESR or on pre-release channels (for testing)

MozReview-Commit-ID: 4tF8t1ozyVp
2018-03-05 20:46:54 -03:00
Florian Quèze
f6add2cafd Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Felipe Gomes
e025f5415f Bug 1440932 - Add some documentation and other small improvements to the policy engine. r=bytesized
MozReview-Commit-ID: 5QeOmcx076r
2018-02-26 15:42:27 -03:00
Michael Kaply
8084862d57 Bug 1433136 - Basic GPO Support. r=Felipe
MozReview-Commit-ID: 1V1aOK3ELZC
2018-02-21 19:49:09 -06:00
Kirk Steuber
bdc0101391 Bug 1429150 - Create an enterprise policy to prevent the application from checking for app updates r=Felipe
MozReview-Commit-ID: 4K4U4AJw7V1
2018-02-07 09:49:37 -08:00
Cosmin Sabou
83bfbe8ae5 Backed out 3 changesets (bug 1429150) for Android mochitest failures on RobocopTestRunner on a CLOSED TREE.
Backed out changeset dbdd43825f46 (bug 1429150)
Backed out changeset 23a86891fdaf (bug 1429150)
Backed out changeset 1f2d0e869605 (bug 1429150)
2018-02-09 00:39:23 +02:00
Kirk Steuber
3aa5eb7153 Bug 1429150 - Create an enterprise policy to prevent the application from checking for app updates r=Felipe
MozReview-Commit-ID: 4K4U4AJw7V1
2018-02-07 09:49:37 -08:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Felipe Gomes
6221ac88fe Bug 1432890 - Refactor the Policies JSON code out of the Policies Manager object in order to support other policies sources. r=Mossop
MozReview-Commit-ID: L6SIgHpp3Yh
2018-02-06 00:28:59 -02:00
Noemi Erli
4b13749b12 Backed out 2 changesets (bug 1432890, bug 1429162) for failing in dom/canvas/test/webgl-conf/generated/ on a CLOSED TREE
Backed out changeset 05b29220fc4d (bug 1429162)
Backed out changeset ee868e1ec636 (bug 1432890)
2018-02-06 07:35:08 +02:00
Felipe Gomes
c233c8796f Bug 1432890 - Refactor the Policies JSON code out of the Policies Manager object in order to support other policies sources. r=Mossop
MozReview-Commit-ID: L6SIgHpp3Yh
2018-02-06 00:28:59 -02:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Felipe Gomes
e03c7564ff Bug 1419102 - Implement the Enterprise Policies feature to provide enterprise users with easier control and setup of deployments of Firefox. r=Mossop
This feature is currently disabled behind a pref, but this pref will be removed when we're green to release it.

MozReview-Commit-ID: 3ZH2UJVdtC0
2018-01-22 17:01:48 -02:00