Topic on Project:Support desk

Extension:Restrict access by category and group

16
Analistacavanha (talkcontribs)

Hello people.

I need to restrict access to a certain category of pages to a certain group of users.

Then I found this extension, and I was able to restrict access to a category of pages with the following command "$ wgGroupPermissions ['Update'] ['private'] = true;" inside Localsettings.php

But I'm not able to make it possible for only a certain group of users to access this category of pages. Is there a way to do this?

Star Warden (talkcontribs)
Analistacavanha (talkcontribs)

Humm, i'am using the 1.28.2 version. There is another way to do this?

AhmadF.Cheema (talkcontribs)

Have you tried the extension? There shouldn't be a problem with MediaWiki 1.28.2 and should work.

Analistacavanha (talkcontribs)

Hi good morning.

I was able to install the extension, it's very focused on namespaces, what I'm needing is this:

I have a user category that is called "documents", I need all users in this group not have access to any page that is in the "Update" category.

Does this extension do this?

AhmadF.Cheema (talkcontribs)
Analistacavanha (talkcontribs)

Got it, I'll try to go that way, as soon as I can get it worked, I record it here on the topic in order to share the result. Thank you very much.

AhmadF.Cheema (talkcontribs)

In case it may be helpful, the following are some of the notes which were shared about a year ago:

  • Extension:CategoryPermissions
  • Extension:IntraACL
    • The extension had patches according the MediaWiki version that needed to be applied for proper functioning of the extension.
    • I was using MediaWiki v1.28alpha, but the latest patch was for v1.26.
    • Tried the patch for v1.26, but it didn't make the extension work.
    • While using update.php, it apparently also created a page: "Permission_denied", which couldn't be deleted.
  • Extension:PermissionACL
    • Got somewhat too complicated to use. Apparently, its default position was to restrict all pages and to include in code the namespaces or categories to exclude.
    • It is possible that I was mistaken in such an assessment, I didn't give enough time to it.
  • Extension:Restrict access by category and group
    • Does not seem to be a need for the groups.php file. As far as I can tell, this file is not even invoked in the main .php file.
    • Not protected from inclusion/transclusion.
    • Hides the page from [[Special:AllPages]], so unless the unauthorized user knows the title of the page, inclusion/transclusion shouldn't be a problem.
    • However, the page is visible from [[Special:RecentChanges]], Wiki search and possibly [[Special:NewPages]] too.
      • On search, page title may appear but the content doesn't show.
    • Diff. and revision links are also protected.
    • Protected from exports, but not any templates (or transcludes) that might be included in the page.
  • Extension:RemoveProtectedContent
    • Removes protected articles from lists (e.g. recentchanges, search results, new articles), and prevents unauthorised users from gaining access to protected content by transcluding it.
    • Patch files were unfortunately for very old MediaWiki versions (v1.15.0 and v1.16.0)
    • Tried patch for ChangesList, but didn't work.
    • Tried it manually for "SpecialRecentchanges.php". Did not try the others.
  • Namespacemanager from BlueSpice
    • Apparently, was not working for newer MediaWiki versions.
Marcus.paulo.marques (talkcontribs)

Hello, I installed the RestrictAccessByCategoryAndGroup extension, it worked in my local environment but remote on the server does not work. I made the following configuration in LocalSettings:

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

$ wgGroupPermissions ['Financialnopublicdata'] ['*'] = true;

$ wgGroupPermissions ['Financialprivatedata'] ['private'] = true;

However, neither the name of the group Financialprivatedata nor the Financialnopublicdata group appears on the special page.

what to do?

AhmadF.Cheema (talkcontribs)

In your Wiki's Special:Version page, is the extension showing up?

Your configuration lines in LocalSettings.php have extra spaces in them, maybe that is causing a syntax issue.

Or, it could be just that the extension being no longer maintained has stopped working for your particular platform.

Marcus.paulo.marques (talkcontribs)

So, I'm using the same version 1.29.0 in the local environment and in the remote. In the local environment it works and in the non remote, the version is the same.

Marcus.paulo.marques (talkcontribs)

In Special: Version appears the extension in the local environment that works but does not appear in the remote server environment that is not working ...

AhmadF.Cheema (talkcontribs)

If it doesn't appear in the Special:Version page, then the extension isn't even installed.

In your remote server, have you correctly created the required directory and files for the extension? Also try removing the extra spaces in your LocalSettings.php code, such as those after the $ signs.

This post was hidden by 191.255.246.246 (history)
Marcus.paulo.marques (talkcontribs)

I already checked all these details ... Anyone else have any other opinion?

Marcus.paulo.marques (talkcontribs)

I can not create groups or use the extension ... Do you know if you have something that can prevent the creation of groups?

Reply to "Extension:Restrict access by category and group"