resourceloader: Merge 'user.groups' into 'user' module
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 10 May 2016 19:47:04 +0000 (20:47 +0100)
committerOri.livneh <ori@wikimedia.org>
Thu, 26 May 2016 04:15:33 +0000 (04:15 +0000)
commit06ab9c0942f66317b20130ed12e677607783a61e
treea8cd0e250ed5efda895537954cd7f9ba9634bea5
parent61ac2e2d0eea92d27db7df0a041c332b528cefd2
resourceloader: Merge 'user.groups' into 'user' module

This is with T92459 in mind to simplify the process of splitting
the 'user' module for the styles-only queue.

Consequences:

* Cached HTML isn't relevant in practice since there is no caching for logged-in
  users and this module is only for logged-in users. Even then, cached HTML will
  work and may happen as browsers re-use HTML responses when revisiting a
  privately cached page (after 304 Not Modified).
  Note that OutputPage (via isKnownEmpty) only actually tries to load 'user.groups'
  if the wiki has 'MediaWiki:Group-*.{js,css}' pages for the current user's groups.

  - Old style queue request will continue to ask for user.groups which is now a
    FileModule with no styles (simply concats the empty string to the bundle)
  - Old load() request will resolve with an empty function.

* The are no known dependants of 'user.groups'. If there are, they will work
  by proxy of it now being an empty module that just ensures 'user' is loaded.

* The security origin of 'user.groups' was USER_SITEWIDE. The origin of 'user'
  is lower (USER_INDIVIDUAL). Pages that are restricted to USER_SITEWIDE
  previously received user.groups, but won't anymore. This should be fine as
  OutputPage::reduceAllowedModules() is mainly used to either allow everything
  or restrict all the way down to CORE. The only exception is disallowUserJs()
  if $wgAllowSiteCSSOnRestrictedPages is enabled (T73621) but that edge case was
  made for Common.css, not Group-*.css.

Change-Id: I74cd2368ebd2989c5e1c22bea491a80beb0319dc
autoload.php
includes/OutputPage.php
includes/resourceloader/ResourceLoaderUserGroupsModule.php [deleted file]
includes/resourceloader/ResourceLoaderUserModule.php
resources/Resources.php