mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 02:03:58 +00:00
97b433286d
* Use only a single error code 'titleblacklist-forbidden' to allow API users to easily identify TitleBlacklist errors. * Return the internal code ('message') and the matching entry's text ('line') in machine-readable format, same as action=titleblacklist (depends on I1334ba21a2862973a9d8ff5be2c9bec06a82698b in MediaWiki). This bumps the version requirement to 1.27, as older MediaWiki versions would ignore the error in new format entirely. Example API output change, for action=edit: Before: { "error": { "code": "custom-message", "info": "TitleBlacklist prevents this title from being created", "*": "See http://localhost/w/api.php for API usage" } } After: { "error": { "code": "titleblacklist-forbidden", "info": "TitleBlacklist prevents this title from being created", "message": "custom-message", "line": ".*test.* <errmsg=custom-message> # test rule", "*": "See http://localhost/w/api.php for API usage" } } Bug: T115258 Change-Id: I42a0c5b0ea7e61088dd609b764dd7d1396c60cd5
113 lines
2.6 KiB
JSON
113 lines
2.6 KiB
JSON
{
|
|
"name": "TitleBlacklist",
|
|
"version": "1.5.0",
|
|
"author": [
|
|
"Victor Vasiliev",
|
|
"Fran Rogers"
|
|
],
|
|
"url": "https://www.mediawiki.org/wiki/Extension:TitleBlacklist",
|
|
"descriptionmsg": "titleblacklist-desc",
|
|
"license-name": "GPL-2.0+",
|
|
"type": "antispam",
|
|
"requires": {
|
|
"MediaWiki": ">= 1.27.0"
|
|
},
|
|
"GroupPermissions": {
|
|
"sysop": {
|
|
"tboverride": true,
|
|
"titleblacklistlog": true
|
|
}
|
|
},
|
|
"AvailableRights": [
|
|
"tboverride",
|
|
"tboverride-account",
|
|
"titleblacklistlog"
|
|
],
|
|
"LogTypes": [
|
|
"titleblacklist"
|
|
],
|
|
"LogRestrictions": {
|
|
"titleblacklist": "titleblacklistlog"
|
|
},
|
|
"LogActionsHandlers": {
|
|
"titleblacklist/*": "LogFormatter"
|
|
},
|
|
"APIModules": {
|
|
"titleblacklist": "ApiQueryTitleBlacklist"
|
|
},
|
|
"MessagesDirs": {
|
|
"TitleBlacklist": [
|
|
"i18n"
|
|
]
|
|
},
|
|
"AutoloadClasses": {
|
|
"TitleBlacklist": "TitleBlacklist.list.php",
|
|
"TitleBlacklistEntry": "TitleBlacklist.list.php",
|
|
"TitleBlacklistHooks": "TitleBlacklist.hooks.php",
|
|
"Scribunto_LuaTitleBlacklistLibrary": "TitleBlacklist.library.php",
|
|
"ApiQueryTitleBlacklist": "api/ApiQueryTitleBlacklist.php"
|
|
},
|
|
"ResourceModules": {
|
|
"mediawiki.api.titleblacklist": {
|
|
"scripts": "mediawiki.api.titleblacklist.js",
|
|
"dependencies": [
|
|
"mediawiki.api"
|
|
]
|
|
}
|
|
},
|
|
"ResourceFileModulePaths": {
|
|
"localBasePath": "modules",
|
|
"remoteExtPath": "TitleBlacklist/modules"
|
|
},
|
|
"Hooks": {
|
|
"getUserPermissionsErrorsExpensive": [
|
|
"TitleBlacklistHooks::userCan"
|
|
],
|
|
"TitleGetEditNotices": [
|
|
"TitleBlacklistHooks::displayBlacklistOverrideNotice"
|
|
],
|
|
"MovePageCheckPermissions": [
|
|
"TitleBlacklistHooks::onMovePageCheckPermissions"
|
|
],
|
|
"AbortNewAccount": [
|
|
"TitleBlacklistHooks::abortNewAccount"
|
|
],
|
|
"AbortAutoAccount": [
|
|
"TitleBlacklistHooks::abortAutoAccount"
|
|
],
|
|
"EditFilter": [
|
|
"TitleBlacklistHooks::validateBlacklist"
|
|
],
|
|
"ArticleSaveComplete": [
|
|
"TitleBlacklistHooks::clearBlacklist"
|
|
],
|
|
"UserCreateForm": [
|
|
"TitleBlacklistHooks::addOverrideCheckbox"
|
|
],
|
|
"UnitTestsList": [
|
|
"TitleBlacklistHooks::unitTestsList"
|
|
],
|
|
"ScribuntoExternalLibraries": [
|
|
"TitleBlacklistHooks::scribuntoExternalLibraries"
|
|
],
|
|
"APIGetAllowedParams": [
|
|
"TitleBlacklistHooks::onAPIGetAllowedParams"
|
|
],
|
|
"AddNewAccountApiForm": [
|
|
"TitleBlacklistHooks::onAddNewAccountApiForm"
|
|
]
|
|
},
|
|
"config": {
|
|
"TitleBlacklistSources": [],
|
|
"TitleBlacklistUsernameSources": "*",
|
|
"TitleBlacklistLogHits": false,
|
|
"TitleBlacklistCaching": {
|
|
"warningchance": 100,
|
|
"expiry": 900,
|
|
"warningexpiry": 600
|
|
},
|
|
"TitleBlacklistBlockAutoAccountCreation": true
|
|
},
|
|
"manifest_version": 1
|
|
}
|