Hi,
Is it possible to edit the error message the extension throws when someome without access rights try to access a page?
Edit the page MediaWiki:Categorylockdown-error in your wiki.
Hi,
Is it possible to edit the error message the extension throws when someome without access rights try to access a page?
Issue was due to user error.
Always use the latest Development version from the downloads page. (Development version does not mean test / beta version)
I used this extenstion and added the code as below
$wgCategoryLockdown['English_Content']['edit'] = 'reviewer';
This must only affect the edit permission, but articles within English Content category became inaccessible to eveyone irrespective of the user group they are part of.
I get the following
You do not have permission to read this page, for the following reason:
You are not allowed to execute the action you have requested.
Hi! I just double-checked the latest version of the extension (3.1) and I couldn't reproduce your issue. That error you're getting doesn't seem to come from CategoryLockdown (CategoryLockdown throws error messages like "This action is restricted to the following user groups: reviewer"). Can you double-check that your wiki doesn't have read permissions globally restricted from LocalSettings.php or by some other extension? As explained in the docs, CategoryLockdown doesn't override global restrictions.
Hi Sorry.
Mistake in my understanding on difference between stable and developement version. Used old version.
Fixed in version 3.1
If i have two categories
and the article has the two categories
I have to be member of both groups TZA and TZI to be allowed edit this article (and function). Is there a possibility to allow editing if you are member of one of these groups (or function)
We have several pages, where the access is restricted not only with one group.
Thanks for replay --Joergens.mi (talk) 09:51, 13 December 2021 (UTC)
Done! Please download the latest version (3.1) and let me know if you notice any issues, thanks!
Use the following syntax:
$wgCategoryLockdown['Maintenance']['read'] = ['sysop','developer'];
Hi Sophivorus,
Thanks for creating this extension, it's been really useful so far.
Would you be able to adapt it to allow multiple groups to access a category instead of only one?
For instance :
$wgCategoryLockdown = [
'Maintenance' => 'sysop', 'developer', 'technician',
];
without having to duplicate the line each time for each user group
It would be totally awesome.
Thanks!
Done! Download the latest version (1.1) and use the following syntax:
$wgCategoryLockdown = [
'Maintenance' => [ 'sysop', 'developer', 'technician' ],
];
I'm glad you're finding the extension useful, good luck!
Use the following syntax:
$wgCategoryLockdown['Sales']['read'] = ['vendor','manager'];
$wgCategoryLockdown['Sales']['edit'] = 'vendor';
Hi Sophivorus,
Thank you so much for the last improvement, it works great! Your extension is extremely useful for my wiki.
I'm looking to be able to distinguish, in a category, the possibility to view pages, and the possibility to edit them.
For instance, I'd like to be able to write something that says that, in the Maintenance category, the groups 'sysop' and 'developer' are able to view and edit pages; but the 'technician' group is only able to view them.
I don't know the proper syntax at all, but something like:
$wgCategoryLockdown = [
'Maintenance' => [ view : 'sysop', 'developer', 'technician' ],
[ edit : 'sysop', 'developer' ]
];
I'm no dev at all, do you reckon it's something you could add to your extension?
If you could, that would be awesome.
Thanks!
Done! Please download the latest version (2.0), try it out and let me know of any bugs or issues! I also generalized the functionality so that you can restrict any permission, not just 'read' and 'edit'. See the updated documentation for the new syntax!
Hi Sophivorus!
Thank you very much for your quick answer and improvement of the extension! I installed the last version of it.
It seems like I found an issue though. It seems that, now, the access restriction only works on the very own page of the category, but not on the pages that are part of this category. I don't think this was an issue before.
To clarify, if I write :
$wgCategoryLockdown['Sales and orders']['read'] = 'vendor';
$wgCategoryLockdown['Sales and orders']['edit'] = 'vendor';
the users that are not part of the 'vendor' group can't read and edit the page "Category:Sales and orders". But they can read and edit all the pages that are contained in the category Sales and orders, which is indesirable.
Do you reckon you could look into it?
Thank you!
EDIT : By testing it a little bit more, I noticed something : the issue only happens when the name of the category contains a space! If there is a space in the category name, the pages that are in this category are not taken into account by the access restrictions.
Hi! Thanks to your detailed bug report, I was able to quickly identify and fix the issue. Please download the latest version (2.1) and let me know of any more issues. Thanks again!