Topic on Project:Support desk

Restrict $wgWhitelistRead by group membership possible?

10
91.42.115.186 (talkcontribs)

I have created a group that can only edit and view a single page. The page call is enabled by $wgWhitelistRead. This also allows anonymous users to read the page. Is it possible to create an if query for registered users in localsettings.php, so that only registered users see the website? Or is there a better way for my purpose?

Ciencia Al Poder (talkcontribs)

I think this can only be done with Extension:Lockdown. However, have in mind that MediaWiki hasn't been built with view restrictions in mind and someone could potentially leak the contents of such hidden pages with various methods.

MarkAHershberger (talkcontribs)

Is it possible to create an if query for registered users in localsettings.php, so that only registered users see the website? Or is there a better way for my purpose?

Yes, see $wgGroupPermissions and, specifically, restricting the "read" permission to the "user" group.
Ciencia Al Poder (talkcontribs)

But what the op wants is a bit more complicated: nobody can see anything, and registered users can edit and read 1 page, where admins (I suppose) have no restrictions. Or at least that's what I understood.

91.42.115.186 (talkcontribs)

Yes, that's exactly what I meant.

Ciencia Al Poder (talkcontribs)

You probably want to use a different software for this. I don't think MediaWiki is suitable for this purpose.

MarkAHershberger (talkcontribs)
  1. Require users to log in.
  2. Install and configure Lockdown so that users can only edit pages in the main namespace.
  3. Remove the ability of normal users to create pages.
  4. Allow Admins to edit any namespace.

This way, the main namespace contains a single page--the default main page that users can log in and edit.

All other editing that admins do is done in other namespaces.

Ciencia Al Poder (talkcontribs)

The thing is, the OP wants to restrict viewing by group

AhmadF.Cheema (talkcontribs)

If Extension:Lockdown is going to be used, then I think it can also be used to restrict "read" permission for specific namespaces too.🤔

MarkAHershberger (talkcontribs)

Yes, Lockdown can work for that.

Reply to "Restrict $wgWhitelistRead by group membership possible?"