Topic on Extension talk:AccessControl

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

2
208.81.12.35 (talkcontribs)

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.


Airammontessori (talkcontribs)

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.


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