Wiki source for UsingAdminGroups


Show raw source

======Using Admin Groups======
>>=====Prerequisites=====
ACLsWithUserGroups
>>::c::To simply have a group of administrators without editing ##wikka.config.php## you can change the line in ##function ""IsAdmin""($user)## in ##libs/Wakka.class.php## from
%%(php)
foreach ($adminarray as $admin) {
if (trim($admin) == $user) return true;
}
%%
to
%%(php)
foreach ($adminarray as $admin) {
if (trim($admin) == $user || $this->isGroupMember($user,trim($admin))) return true;
}
%%

Then, you can add in ##wikka.config.php##
%%(php)
'admin_users' => 'AdminGroup',
%%

As I don't know, if there are any problems involved administrating a Wikka this way, you should have at least one admin user name entered in ##admin_users##. A first test showed it works as intended. **Don't forget to set the new ""AdminGroup"" writable only by ""AdminGroup"" or another admin from ##admin_users##.** Else, any user could write her name on the page and get admin access.
::c::----
CategoryUserContributions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki