Extension talk:AccessControl/2019

57 previous topics.

Previous discussion was archived at Extension talk:AccessControl/Archive 1 on 24 October 2016.

migrated from Simple Security to AccessControl on mw 1.32 without Issue.

Just commented out the require once for Simple Security, and added Access-Control


require_once("{IP}/extensions/Acess/Control/AccessControl.php");

$wgAdminCanReadAll = true;

$wgAccessControlRedirect = true;


I have the groups still in place from the SimpleSecurity extension ie;


# create user groups

$wgSecurityExtraGroups = array('TEAMSecure');

#prevent includes for pages that need extra security.

$wgNonincludableNamespaces = array('Example_page');

#Groups for secure pages

$wgGroupPermissions['all']['read'] = false;

$wgGroupPermissions['TEAMSecure']['read'] = true;

$wgGroupPermissions['TEAMSecure']['writeapi'] = true;

$wgGroupPermissions['TEAMSecure']['edit'] = true;

$wgGroupPermissions['TEAMSecure']['editinterface'] = true;

$wgGroupPermissions['TEAMSecure']['read'] = true;


So have used them accordingly;

Now on pages to be protected instead of adding [[Category:TEAMSecure]]

to secure the pae from all but the TEAMSecure group I used;

<accesscontrol>Administrators,TEAMSecure</accesscontrol>


The page is protected from view or edit, the user is redirected to a page called Deny User for authenticated users without access to that page.

and Deny anonymous for unauthenticated users.


Those pages can be edited by those users but all they change is the message they see when they try to get to the protected page since its redirected, I watch those pages for changes accordingly.

I did not keep the secure categories secition as this extension works atthe page/subpage level.


you may want to Disable some special pages to hide them or a subset of them accordingly. to prevent unauthorized users from using those tools to work around the extension.


Use the disablespecialpages extension .Extension:DisableSpecialPages

to disable all but login create user and search or look into this function that can disable any special pages including search


function disableSomeSpecialPages(&$list) {

       global $wgUser;

       #If not sysop disable other pages

       if (!in_array("sysop", $wgUser->getEffectiveGroups())) {

               unset($list['Version']);

               unset($list['Contributions']);

               unset($list['Allpages']);

               unset($list['Lonelypages']);

               unset($list['Longpages']);

               unset($list['Uncategorizedcategories']);

               unset($list['Categories']);

               unset($list['CreateCategory']);

               unset($list['CreateForm']);

               unset($list['CreateTemplate']);

               unset($list['Search']);

}

       return true;

}

$wgHooks['SpecialPage_initList'][] = 'disableSomeSpecialPages';


This is working well on mw 1.32 for me.


208.81.12.35 (talk) 16:09, 14 March 2019 (UTC)

Hi there, I've done exactly what you've done but the AccessControl is not working for me. I can't access a page with a user belonging to a group that is supposed to have access to it.
Only work with admin group of course with:
$wgAdminCanReadAll = true;
of course ...
Which version of the extension are you using? I run the latest 2.6. The author mentionned something about the 2.5.1 which is better but I don't know where to find this version and it is unclear to me what's the difference between both.

Airammontessori (talk) 20:43, 26 May 2019 (UTC)

Once you mistype the <accesscontrol> </accesscontrol> you cannot access the page any more

Is there a workout to undo the changes if you are not the admin and mistype the <accesscontrol> tag? Janos.tapolcai (talk) 19:12, 10 September 2019 (UTC)

in fact the help here is very useful (and readable after translating to English with google) [https://www.thewoodcraft.org/wiki/index.php/AccessControl]
==When you can't get to the page==
Do not panic!
If you mistakenly removed your name from the list of users authorized to edit the page and you know another user who has access to edit the page, you can try to ask the user to correct your mistake and add you to the list again.
If you do not know anybody and no other user has access to the page, you must ask for help from a user who has administrator rights ('sysop').
However, this will not help if the privileged status of this user group is disabled via $ wgAdminCanReadAll , or if you have managed to block access to a page in such a way that even an administrator (a user in the 'sysop' group) cannot access it. Such a situation may occur, for example, in the case of multiple translucency.
Then you have only one option.
If you do not have access to the configuration file LocalSettings.php, you must ask whoever has access to temporarily deactivate AccessControl so that you can fix the faulty record, or to fix it for you - the easiest and quickest thing is to completely delete the page content. You can then draw it from a previous revision and it will minimize the time it takes to solve your problem. Janos.tapolcai (talk) 06:23, 11 September 2019 (UTC)
A little workaround which may also make editing faster: Create a template "Accescontrol" and add the content to go with the tags via an unnamed parameter. Have not tested this but it should work. But yes, a mistyped tag should probably not result into something like this. [[kgh]] (talk) 08:13, 11 September 2019 (UTC)