MediaWiki REL1_37
|
Block permissions. More...
Public Member Functions | |
__construct (ServiceOptions $options, BlockUtils $blockUtils, $target, Authority $performer) | |
checkBasePermissions ( $checkHideuser=false) | |
Check base permission that apply to either block or unblock. | |
checkBlockPermissions () | |
Checks block-related permissions (doesn't check any other permissions) | |
checkEmailPermissions () | |
Check permission to block emailing. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Private Attributes | |
ServiceOptions | $options |
Authority | $performer |
Block performer. | |
UserIdentity string null | $target |
Block target or null when unknown. | |
int null | $targetType = null |
One of AbstractBlock::TYPE_* constants, or null when unknown. | |
Block permissions.
This class is responsible for making sure a user has permission to block
This class is usable for both blocking as well as the unblocking process.
Definition at line 38 of file BlockPermissionChecker.php.
MediaWiki\Block\BlockPermissionChecker::__construct | ( | ServiceOptions | $options, |
BlockUtils | $blockUtils, | ||
$target, | |||
Authority | $performer | ||
) |
ServiceOptions | $options | |
BlockUtils | $blockUtils | |
UserIdentity | string | null | $target | |
Authority | $performer |
Definition at line 70 of file BlockPermissionChecker.php.
References MediaWiki\Block\BlockPermissionChecker\$options, MediaWiki\Block\BlockPermissionChecker\$performer, MediaWiki\Block\BlockPermissionChecker\$target, MediaWiki\Config\ServiceOptions\assertRequiredOptions(), and MediaWiki\Block\BlockUtils\parseBlockTarget().
MediaWiki\Block\BlockPermissionChecker::checkBasePermissions | ( | $checkHideuser = false | ) |
Check base permission that apply to either block or unblock.
bool | $checkHideuser |
Definition at line 89 of file BlockPermissionChecker.php.
MediaWiki\Block\BlockPermissionChecker::checkBlockPermissions | ( | ) |
Checks block-related permissions (doesn't check any other permissions)
T17810: Sitewide blocked admins should not be able to block/unblock others with one exception; they can block the user who blocked them, to reduce advantage of a malicious account blocking all admins (T150826).
T208965: Partially blocked admins can block and unblock others as normal.
Definition at line 115 of file BlockPermissionChecker.php.
References MediaWiki\User\UserIdentity\equals(), and MediaWiki\User\UserIdentity\getId().
MediaWiki\Block\BlockPermissionChecker::checkEmailPermissions | ( | ) |
Check permission to block emailing.
Definition at line 167 of file BlockPermissionChecker.php.
|
private |
Definition at line 62 of file BlockPermissionChecker.php.
Referenced by MediaWiki\Block\BlockPermissionChecker\__construct().
|
private |
Block performer.
Definition at line 52 of file BlockPermissionChecker.php.
Referenced by MediaWiki\Block\BlockPermissionChecker\__construct().
|
private |
Block target or null when unknown.
Definition at line 42 of file BlockPermissionChecker.php.
Referenced by MediaWiki\Block\BlockPermissionChecker\__construct().
|
private |
One of AbstractBlock::TYPE_* constants, or null when unknown.
Definition at line 47 of file BlockPermissionChecker.php.
const MediaWiki\Block\BlockPermissionChecker::CONSTRUCTOR_OPTIONS |
Definition at line 57 of file BlockPermissionChecker.php.