Topic on Extension talk:Lockdown

Unable to edit pages as an admin

6
JamesPoulson (talkcontribs)

I installed Lockdown to restrict access to Special:ListUsers.

Added:

require_once "$IP/extensions/Lockdown/Lockdown.php";

Added:

$wgSpecialPageLockdown['Listusers'] = array('user');

Then changed it to:

$wgSpecialPageLockdown['Listusers'] = array('user','sysop');

As a result I couldn't access Special:ListUsers as an admin and I couldn't edit any pages as they are restricted to users.

This is quite unexpected.

I'm going to have a re-read through the manual :p

Kghbln (talkcontribs)

Indeed this appears quite unexpected. The settings as such look ok to me so there is perhaps something else in the water. What are we versions of MediaWiki, Lockdown and PHP you are using? Perhaps it is a bug worth reporting.

Ryan.lewkowicz (talkcontribs)

I'm having the same issue (and really just a slew of weird issues that I can't quite pin down), using latest 1.27 from github. Lockdown from distribution for 1.27 and php7. I think it's related to this:

https://phabricator.wikimedia.org/T127456

https://phabricator.wikimedia.org/rELCK0d59ae7a7e0e3eb5a4638ba8f814a57926dada42

I think something in 1.27 broke the way users are handled. If you try to hit $wgUser in Localsettings.php with something like $wgUser->getName() you'll hit an exception somewhere in the chain since it can't access null. I ended up having to do certain things via OutputPageBeforeHTML so I knew for a fact the user was loaded.

I'm almost thinking about loading the extension on the usercan can hook and seeing if that will force a proper load order.

I'm not cool enough to understand the full scope of the application yet

Ryan.lewkowicz (talkcontribs)

To add, this https://github.com/rlewkowicz/docker-mediawiki-stack is an exect version of my install (minus Lockdown). Parsoid is a bit weird since I have to forward through nginx becuase it wants host to be the same in localsettings and parsoid settings and if it's in containers, that doesn't work. At somepoint I'll get rest base up and running

Kghbln (talkcontribs)

I cannot replicate this on MediaWiki 1.27.1 and Lockdown REL1_27. However I use PHP 5.6 for the change. Issue T127456 was indeed a pain but has been resolved. So this should not be the issue for you. T148528 is still open. Perhaps this is the one troubling you too.

Kghbln (talkcontribs)

Great, now that T148582 will be resolved by doing a backport to MediaWiki core with change 325566 all we have to do is wait for the MW 1.27.2 release.

Reply to "Unable to edit pages as an admin"