MediaWiki-Docker/Extension/CheckUser

From mediawiki.org

This page instructs you to install Extension:CheckUser inside MediaWiki-Docker .

Follow the Quickstart instructions at MediaWiki-Docker page. Once MediaWiki is running and available at http://localhost:8080, then continue with instructions on this page.

All commands should be run in the directory where you installed MediaWiki. All mentioned files are also located there.

Clone the repository and its dependencies[edit]

git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/CheckUser" extensions/CheckUser
git clone "https://gerrit.wikimedia.org/r/mediawiki/skins/Vector" skins/Vector

Install Composer dependencies[edit]

Add this to composer.local.json:

{
	"extra": {
		"merge-plugin": {
			"include": [
				"extensions/CheckUser/composer.json"
			]
		}
	}
}

Alternatively copy

mv composer.local.json-sample composer.local.json

As this will include all extensions' composer.json files by default.

Run:

docker compose exec mediawiki composer update

Modify LocalSettings.php[edit]

If not already there, add this to the end of LocalSettings.php.

wfLoadExtension( 'CheckUser' );
wfLoadSkin( 'Vector' );

Run maintenance scripts[edit]

docker compose exec mediawiki php maintenance/run.php update.php


Giving an account the rights to use the CheckUser extension (optional)[edit]

To be able to access the data provided by the CheckUser extension, you will need an account with the checkuser group. This can be done using the script where <username> is replaced with the username of an existing account you want to give the checkuser rights.

docker compose exec mediawiki php maintenance/run.php createAndPromote.php <username> [password] --custom-groups checkuser

Alternatively standard installations should allow granting the checkuser rights by any bureaucrat.

Adding fake data for testing (optional)[edit]

MediaWiki version:
1.41

To effectively test the CheckUser extension, you may desire to insert fake testing data to the results tables. This can be done by running the populateCheckUserTablesWithSimulatedData.php maintenance script. You must change add $wgCheckUserDeveloperMode = true; to your LocalSettings.php file to use the script. The first argument for the script is the number of testing actions to insert, which if not specified defaults to 1000.

Warning Warning: This will create real revisions and create entries in Special:Log. Do not use this on a production wiki.
docker compose exec mediawiki php extensions/CheckUser/maintenance/populateCheckUserTablesWithSimulatedData.php <count>