dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Make SpecialPageDataTest independend from the language
[lhc/web/wiklou.git]
/
includes
/
auth
/
CheckBlocksSecondaryAuthenticationProvider.php
diff --git
a/includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
b/includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
index
10925b5
..
92b06a4
100644
(file)
--- a/
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
+++ b/
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
@@
-22,6
+22,7
@@
namespace MediaWiki\Auth;
use Config;
namespace MediaWiki\Auth;
use Config;
+use MediaWiki\Block\DatabaseBlock;
use StatusValue;
/**
use StatusValue;
/**
@@
-59,9
+60,11
@@
class CheckBlocksSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
}
public function beginSecondaryAuthentication( $user, array $reqs ) {
}
public function beginSecondaryAuthentication( $user, array $reqs ) {
+ // @TODO Partial blocks should not prevent the user from logging in.
+ // see: https://phabricator.wikimedia.org/T208895
if ( !$this->blockDisablesLogin ) {
return AuthenticationResponse::newAbstain();
if ( !$this->blockDisablesLogin ) {
return AuthenticationResponse::newAbstain();
- } elseif ( $user->
isBlocked
() ) {
+ } elseif ( $user->
getBlock
() ) {
return AuthenticationResponse::newFail(
new \Message( 'login-userblocked', [ $user->getName() ] )
);
return AuthenticationResponse::newFail(
new \Message( 'login-userblocked', [ $user->getName() ] )
);
@@
-93,7
+96,7
@@
class CheckBlocksSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
$block->getByName()
];
$block->getByName()
];
- if ( $block->getType() ===
\
Block::TYPE_RANGE ) {
+ if ( $block->getType() ===
Database
Block::TYPE_RANGE ) {
$errorMessage = 'cantcreateaccount-range-text';
$errorParams[] = $this->manager->getRequest()->getIP();
} else {
$errorMessage = 'cantcreateaccount-range-text';
$errorParams[] = $this->manager->getRequest()->getIP();
} else {