Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/261924

Change subject: Throw PermissionsError exception directly
......................................................................

Throw PermissionsError exception directly

Change-Id: I297f204fe0589a70075c1aa96c6c88f1397ce3d9
---
M AuthorProtect.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AuthorProtect 
refs/changes/24/261924/1

diff --git a/AuthorProtect.php b/AuthorProtect.php
index 4c289ca..78b5296 100644
--- a/AuthorProtect.php
+++ b/AuthorProtect.php
@@ -110,8 +110,7 @@
                }
                global $wgOut, $wgUser, $wgRequest, $wgRestrictionTypes;
                if ( !$wgUser->isAllowed( 'authorprotect' ) ) {
-                       $wgOut->permissionRequired( 'authorprotect' );
-                       return false;
+                       throw new PermissionsError( 'authorprotect' );
                }
                if ( !self::userIsAuthor( $article->getTitle() ) ) {
                        $wgOut->setPageTitle( wfMessage( 'errorpagetitle' ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/261924
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I297f204fe0589a70075c1aa96c6c88f1397ce3d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AuthorProtect
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to