Topic on Project:Support desk

Lockdown not working.

5
195.34.150.254 (talkcontribs)

Hi,

I installed the newest mediawiki server software and the extensions LDAPAuthentication and Lockdown.

I , finally, managed to get the groups into mediawiki, but now lockdown doesn't work for any group at all. Even if i create them myself or if they are importet from the LDAP server.

define('NS_OK',550);

$wgExtraNamespaces[NS_OK] = 'ok';

$wgNamespacePermissionLockdown[NS_OK]['read']= array('users'); # so it only works for logged in users.

i haven't changed any other permission settings, lockdown does show up in the Specials:Version page, but acces to :ok is not restricted in any way to anyone.

help is much apreachiated.

AhmadF.Cheema (talkcontribs)

What do you mean by "newest mediawiki server software"? Is it v1.27 or 1.28-alpha?

Are you using master version of Extension:Lockdown? If not, I recommend using it as older versions have issues with MediaWiki v1.27 and above.

195.34.150.254 (talkcontribs)

Hi AhmadF.Cheema,

I am using:

Mediawiki : 1.27.0

Lockdown: -(0d8aa13) (for 1.27)

i downloaded a lockdown snapshot, do you mean i should try it with the download from git master ?

195.34.150.254 (talkcontribs)

Ok, now something weird is happening:

Localsettings for Lockdown:

#Lockdown

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

#define custom namespaces

define ('NS_OK',550);

define ('NS_OK_TALK',551);

$wgExtraNamespaces[NS_OK] = 'ok';

$wgExtraNamespaces[NS_OK_TALK]='ok_talk';

#restrict "read" perm

$wgNamespacePermissionLockdown[NS_OK]['read'] = array('wikisecrets');

$wgNamespacePermissionLockdown[NS_OK_TALK]['read']= array('users');

$wgNonincludeableNamespaces[] = NS_OK;

$wgNonincludeableNamespaces[] = NS_OK_TALK;

---------------------

The Page <IP>/mediawiki/index.php/Main_Page:ok -accessible for all users

Page <IP>/mediawiki/index.php/ok:ok --doesn't exsist, but is is only accessible for users in wikisecrets.

I have no idea why it doesn't work like it did before, did i switch something up ?

AhmadF.Cheema (talkcontribs)

Navigate to your Special:Preferences on your Wiki, are the "Member of groups:" showing you as part of any groups?

If not, this was exactly the bug in Extension:Lockdown.

The master version should have worked, but maybe I don't know how the git commits at Wikimedia work.

Alternatively, you can try the fix manually. The fix for the bug is mentioned here: https://phabricator.wikimedia.org/T137051 at near the middle of the page.

The changes mentioned here will have to be applied to your Lockdown.php file.

Reply to "Lockdown not working."