Follow-up to Ia3f46aba. Before that patch, the default case for
whether a block blocks password reset was true.
Bug: T218905
Change-Id: I86cb381762890abddcf32f4f7199799391cc6dfb
* Check if the block prevents a user from resetting their password
*
* @since 1.33
- * @return bool|null The block blocks password reset
+ * @return bool The block blocks password reset
*/
public function appliesToPasswordReset() {
switch ( $this->getSystemBlockType() ) {
case 'wgSoftBlockRanges':
return false;
default:
- return false;
+ return true;
}
}
'globalBlock' => null,
'isAllowed' => true,
],
+ 'blocked with an unknown system block type' => [
+ 'passwordResetRoutes' => [ 'username' => true ],
+ 'enableEmail' => true,
+ 'allowsAuthenticationDataChange' => true,
+ 'canEditPrivate' => true,
+ 'block' => new Block( [ 'systemBlock' => 'unknown' ] ),
+ 'globalBlock' => null,
+ 'isAllowed' => false,
+ ],
'all OK' => [
'passwordResetRoutes' => [ 'username' => true ],
'enableEmail' => true,