jenkins-bot has submitted this change and it was merged.
Change subject: (bug 44792) Merge "globalunblock" right into "globalblock"
......................................................................
(bug 44792) Merge "globalunblock" right into "globalblock"
Merging these two rights will make it more similar to the "block"
right that exists in core, as well as that there is no reason
in which a user would be given one right and not the other.
Change-Id: Idc399e19b3aea9a18473eaaf8709e3a47445a0e1
---
M GlobalBlocking.class.php
M GlobalBlocking.i18n.php
M GlobalBlocking.php
M SpecialGlobalBlockList.php
M SpecialRemoveGlobalBlock.php
5 files changed, 7 insertions(+), 10 deletions(-)
Approvals:
CSteipp: Looks good to me, approved
Hoo man: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/GlobalBlocking.class.php b/GlobalBlocking.class.php
index 2f2efe4..8970fc3 100644
--- a/GlobalBlocking.class.php
+++ b/GlobalBlocking.class.php
@@ -506,12 +506,12 @@
$title = SpecialPage::getTitleFor( 'GlobalBlockList' );
$links[] = Linker::linkKnown( $title, wfMessage(
'globalblocklist' )->escaped() );
}
-
- if ( $pagetype != 'GlobalBlock' && $wgUser->isAllowed(
'globalblock' ) ) {
+ $canBlock = $wgUser->isAllowed( 'globalblock' );
+ if ( $pagetype != 'GlobalBlock' && $canBlock ) {
$title = SpecialPage::getTitleFor( 'GlobalBlock' );
$links[] = Linker::linkKnown( $title, wfMessage(
'globalblocking-goto-block' )->escaped() );
}
- if ( $pagetype != 'RemoveGlobalBlock' && $wgUser->isAllowed(
'globalunblock' ) ) {
+ if ( $pagetype != 'RemoveGlobalBlock' && $canBlock ) {
$title = SpecialPage::getTitleFor( 'RemoveGlobalBlock'
);
$links[] = Linker::linkKnown( $title, wfMessage(
'globalblocking-goto-unblock' )->escaped() );
}
diff --git a/GlobalBlocking.i18n.php b/GlobalBlocking.i18n.php
index 5f576ad..e0f7849 100644
--- a/GlobalBlocking.i18n.php
+++ b/GlobalBlocking.i18n.php
@@ -151,7 +151,6 @@
// User rights
'right-globalblock' => 'Make global blocks',
'action-globalblock' => 'make global blocks',
- 'right-globalunblock' => 'Remove global blocks',
'action-globalunblock' => 'remove global blocks',
'right-globalblock-whitelist' => 'Disable global blocks locally',
'action-globalblock-whitelist' => 'disable global blocks locally',
diff --git a/GlobalBlocking.php b/GlobalBlocking.php
index b622fbb..16cf4dd 100644
--- a/GlobalBlocking.php
+++ b/GlobalBlocking.php
@@ -64,10 +64,8 @@
## Permissions
$wgGroupPermissions['steward']['globalblock'] = true;
-$wgGroupPermissions['steward']['globalunblock'] = true;
$wgGroupPermissions['sysop']['globalblock-whitelist'] = true;
$wgAvailableRights[] = 'globalblock';
-$wgAvailableRights[] = 'globalunblock';
$wgAvailableRights[] = 'globalblock-whitelist';
$wgAvailableRights[] = 'globalblock-exempt';
diff --git a/SpecialGlobalBlockList.php b/SpecialGlobalBlockList.php
index 170660e..8a86693 100644
--- a/SpecialGlobalBlockList.php
+++ b/SpecialGlobalBlockList.php
@@ -157,8 +157,8 @@
## Do afterthoughts (comment, links for admins)
$info = array();
-
- if ( $this->getUser()->isAllowed( 'globalunblock' ) ) {
+ $canBlock = $this->getUser()->isAllowed( 'globalblock' );
+ if ( $canBlock ) {
$unblockTitle = SpecialPage::getTitleFor(
"RemoveGlobalBlock" );
$info[] = Linker::link( $unblockTitle,
$this->msg( 'globalblocking-list-unblock'
)->parse(),
@@ -177,7 +177,7 @@
);
}
- if ( $this->getUser()->isAllowed( 'globalblock' ) ) {
+ if ( $canBlock ) {
$reblockTitle = SpecialPage::getTitleFor( 'GlobalBlock'
);
$msg = $this->msg( 'globalblocking-list-modify'
)->parse();
$info[] = Linker::link(
diff --git a/SpecialRemoveGlobalBlock.php b/SpecialRemoveGlobalBlock.php
index ff3b8e8..9635fce 100644
--- a/SpecialRemoveGlobalBlock.php
+++ b/SpecialRemoveGlobalBlock.php
@@ -4,7 +4,7 @@
public $mAddress, $mReason;
function __construct() {
- parent::__construct( 'RemoveGlobalBlock', 'globalunblock' );
+ parent::__construct( 'RemoveGlobalBlock', 'globalblock' );
}
function execute( $par ) {
--
To view, visit https://gerrit.wikimedia.org/r/48608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc399e19b3aea9a18473eaaf8709e3a47445a0e1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits