Manual:Hooks/PermissionErrorAudit
Appearance
PermissionErrorAudit | |
---|---|
Available from version 1.39.0 (Gerrit change 802483) Called after permission checks to allow logging. | |
Define function: | public static function onPermissionErrorAudit(
MediaWiki\Linker\LinkTarget $title,
MediaWiki\User\UserIdentity $user,
string $action,
string $rigor,
array $errors
) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"PermissionErrorAudit": "MediaWiki\\Extension\\MyExtension\\Hooks::onPermissionErrorAudit"
}
}
|
Called from: | File(s): Permissions/PermissionManager.php Function(s): getPermissionErrorsInternal |
Interface: | PermissionErrorAuditHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:PermissionErrorAudit extensions.
Details
[edit]$title
: Page in question$user
: User to check$action
: Action being checked$rigor
: One ofPermissionManager::RIGOR_
constants$errors
: Array of arrays of the arguments towfMessage()
to explain permissions problems.
Cannot be aborted.