Ori.livneh has submitted this change and it was merged.

Change subject: Further restrict 404s
......................................................................


Further restrict 404s

Change-Id: I9d8e581df9dbacf283d9841f1ec0fef8042461d6
---
M includes/page/Article.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/page/Article.php b/includes/page/Article.php
index 6afb639..f15521f 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1229,7 +1229,8 @@
                # so be careful showing this. 404 pages must be cheap as they 
are hard to cache.
                $cache = ObjectCache::getMainStashInstance();
                $key = wfMemcKey( 'page-recent-delete', md5( 
$title->getPrefixedText() ) );
-               $loggedIn = $this->getContext()->getUser()->isLoggedIn();
+               $user = $this->getContext()->getUser();
+               $loggedIn = $user->isLoggedIn() && $user->isAllowed( 
'editsemiprotected' );
                if ( $loggedIn || $cache->get( $key ) ) {
                        $logTypes = array( 'delete', 'move' );
                        $conds = array( "log_action != 'revision'" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d8e581df9dbacf283d9841f1ec0fef8042461d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf23
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to