mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-23 15:56:59 +00:00
Send log entries to CheckUser
Because our log is restricted, we don't publish it to RecentChanges, so it never ends up in CU. Let's be consistent and log these to CheckUser as well. Bug: T301992 Change-Id: I37dac4ecdcf70368f416fc2983afbb4238c19bb2
This commit is contained in:
parent
519387f7b6
commit
152c80c2cf
|
@ -4,12 +4,14 @@ $cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.
|
|||
$cfg['directory_list'] = array_merge(
|
||||
$cfg['directory_list'],
|
||||
[
|
||||
'../../extensions/CheckUser',
|
||||
'../../extensions/Echo',
|
||||
]
|
||||
);
|
||||
$cfg['exclude_analysis_directory_list'] = array_merge(
|
||||
$cfg['exclude_analysis_directory_list'],
|
||||
[
|
||||
'../../extensions/CheckUser',
|
||||
'../../extensions/Echo',
|
||||
]
|
||||
);
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace MediaWiki\Extension\OATHAuth\Special;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use ManualLogEntry;
|
||||
use MediaWiki\CheckUser\Hooks as CheckUserHooks;
|
||||
use MediaWiki\Config\ConfigException;
|
||||
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
||||
use MediaWiki\HTMLForm\HTMLForm;
|
||||
|
@ -151,6 +153,10 @@ class DisableOATHForUser extends FormSpecialPage {
|
|||
$logEntry->setComment( $formData['reason'] );
|
||||
$logEntry->insert();
|
||||
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'CheckUser' ) ) {
|
||||
CheckUserHooks::updateCheckUserData( $logEntry->getRecentChange() );
|
||||
}
|
||||
|
||||
LoggerFactory::getInstance( 'authentication' )->info(
|
||||
'OATHAuth disabled for {usertarget} by {user} from {clientip}', [
|
||||
'user' => $this->getUser()->getName(),
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace MediaWiki\Extension\OATHAuth\Special;
|
||||
|
||||
use ExtensionRegistry;
|
||||
use ManualLogEntry;
|
||||
use MediaWiki\CheckUser\Hooks as CheckUserHooks;
|
||||
use MediaWiki\Config\ConfigException;
|
||||
use MediaWiki\Extension\OATHAuth\OATHUserRepository;
|
||||
use MediaWiki\HTMLForm\HTMLForm;
|
||||
|
@ -131,6 +133,10 @@ class VerifyOATHForUser extends FormSpecialPage {
|
|||
$logEntry->setComment( $formData['reason'] );
|
||||
$logEntry->insert();
|
||||
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'CheckUser' ) ) {
|
||||
CheckUserHooks::updateCheckUserData( $logEntry->getRecentChange() );
|
||||
}
|
||||
|
||||
LoggerFactory::getInstance( 'authentication' )->info(
|
||||
'OATHAuth status checked for {usertarget} by {user} from {clientip}', [
|
||||
'user' => $this->getUser()->getName(),
|
||||
|
|
Loading…
Reference in a new issue