mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-14 19:30:11 +00:00
50bc57a200
Instead of misusing the config section of extension.json to declare captcha triggers in the ConfirmEdits CaptchaTriggers config variable, other extensions can now use the CaptchaTriggers attribute for the exact same thing. E.g., to declare a new trigger, the following addition to the own extension.json will register the trigger in ConfirmEdit: "CaptchaTriggers": { "wikiforum": true } This also removes the CaptchaClass config from the main extension.json config section, and automatically sets the SimpleCaptcha module in the getInstance() method of ConfirmEditHooks, which is a pre-requirement for the mediawiki/core change Ieeb26011e42c741041d2c3252238ca0823b99eb4. Bug: T152929 Change-Id: I4c5eaf87657f5dc07787480a2f1a56a1db8c714f
122 lines
3.3 KiB
JSON
122 lines
3.3 KiB
JSON
{
|
|
"@doc": "Please read README.md",
|
|
"name": "ConfirmEdit",
|
|
"version": "1.5.1",
|
|
"author": [
|
|
"Brion Vibber",
|
|
"Florian Schmidt",
|
|
"Sam Reed",
|
|
"..."
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:ConfirmEdit",
|
|
"descriptionmsg": "captcha-desc",
|
|
"license-name": "GPL-2.0+",
|
|
"type": "antispam",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.28"
|
|
},
|
|
"GroupPermissions": {
|
|
"*": {
|
|
"skipcaptcha": false
|
|
},
|
|
"user": {
|
|
"skipcaptcha": false
|
|
},
|
|
"autoconfirmed": {
|
|
"skipcaptcha": false
|
|
},
|
|
"bot": {
|
|
"skipcaptcha": true
|
|
},
|
|
"sysop": {
|
|
"skipcaptcha": true
|
|
}
|
|
},
|
|
"AvailableRights": [
|
|
"skipcaptcha"
|
|
],
|
|
"ExtensionFunctions": [
|
|
"ConfirmEditHooks::confirmEditSetup"
|
|
],
|
|
"SpecialPages": {
|
|
"Captcha": "CaptchaSpecialPage"
|
|
},
|
|
"MessagesDirs": {
|
|
"ConfirmEdit": [
|
|
"i18n"
|
|
]
|
|
},
|
|
"ExtensionMessagesFiles": {
|
|
"ConfirmEditAlias": "ConfirmEdit.alias.php"
|
|
},
|
|
"AutoloadClasses": {
|
|
"ConfirmEditHooks": "includes/ConfirmEditHooks.php",
|
|
"SimpleCaptcha": "SimpleCaptcha/Captcha.php",
|
|
"CaptchaStore": "includes/CaptchaStore.php",
|
|
"CaptchaSessionStore": "includes/CaptchaStore.php",
|
|
"CaptchaCacheStore": "includes/CaptchaStore.php",
|
|
"CaptchaHashStore": "includes/CaptchaStore.php",
|
|
"CaptchaTriggers": "includes/CaptchaTriggers.php",
|
|
"CaptchaSpecialPage": "includes/specials/SpecialCaptcha.php",
|
|
"CaptchaPreAuthenticationProvider": "includes/auth/CaptchaPreAuthenticationProvider.php",
|
|
"CaptchaAuthenticationRequest": "includes/auth/CaptchaAuthenticationRequest.php"
|
|
},
|
|
"ResourceModules": {
|
|
"ext.confirmEdit.editPreview.ipwhitelist.styles": {
|
|
"position": "top",
|
|
"styles": "ext.confirmEdit.editPreview.ipwhitelist.styles.css"
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "resources",
|
|
"remoteExtPath": "ConfirmEdit/resources"
|
|
},
|
|
"Hooks": {
|
|
"EditPageBeforeEditButtons": "ConfirmEditHooks::confirmEditPage",
|
|
"EmailUserForm": "ConfirmEditHooks::injectEmailUser",
|
|
"EmailUser": "ConfirmEditHooks::confirmEmailUser",
|
|
"PageContentSaveComplete": "ConfirmEditHooks::onPageContentSaveComplete",
|
|
"EditPage::showEditForm:fields": "ConfirmEditHooks::showEditFormFields",
|
|
"EditFilterMergedContent": "ConfirmEditHooks::confirmEditMerged",
|
|
"APIGetAllowedParams": "ConfirmEditHooks::APIGetAllowedParams",
|
|
"TitleReadWhitelist": "ConfirmEditHooks::onTitleReadWhitelist",
|
|
"AlternateEditPreview": "ConfirmEditHooks::onAlternateEditPreview",
|
|
"AuthChangeFormFields": "ConfirmEditHooks::onAuthChangeFormFields"
|
|
},
|
|
"AuthManagerAutoConfig": {
|
|
"preauth": {
|
|
"CaptchaPreAuthenticationProvider":{
|
|
"class": "CaptchaPreAuthenticationProvider",
|
|
"sort": 10
|
|
}
|
|
}
|
|
},
|
|
"config": {
|
|
"CaptchaWhitelistIP": false,
|
|
"Captcha": null,
|
|
"CaptchaTriggers": {
|
|
"edit": false,
|
|
"create": false,
|
|
"sendemail": false,
|
|
"addurl": true,
|
|
"createaccount": true,
|
|
"badlogin": true,
|
|
"badloginperuser": true,
|
|
"_merge_strategy": "array_plus"
|
|
},
|
|
"CaptchaTriggersOnNamespace": {
|
|
"_merge_strategy": "array_plus_2d"
|
|
},
|
|
"CaptchaStorageClass": "CaptchaSessionStore",
|
|
"CaptchaSessionExpiration": 1800,
|
|
"CaptchaBadLoginExpiration": 300,
|
|
"CaptchaBadLoginPerUserExpiration": 600,
|
|
"AllowConfirmedEmail": false,
|
|
"CaptchaBadLoginAttempts": 3,
|
|
"CaptchaBadLoginPerUserAttempts": 20,
|
|
"CaptchaWhitelist": false,
|
|
"CaptchaRegexes": []
|
|
},
|
|
"manifest_version": 1
|
|
}
|