How do I create my own custom group in mediawiki?

You can add permissions for new groups to your LocalSettings.php file and they will automatically appear in the Special:UserRights page.

For example, I wanted to disallow editing by regular users but create a “Trusted” group that was allowed to edit. The following code creates a “Trusted” group that is equal to the “user” group, except that “Trusted” users can edit but “user” users cannot.

$wgGroupPermissions['Trusted'] = $wgGroupPermissions['user'];
$wgGroupPermissions['user'   ]['edit']          = false;
$wgGroupPermissions['Trusted']['edit']          = true;
$wgGroupPermissions['sysop'  ]['edit']          = true;

On the Special:UserRights page, I can now check the “Trusted” box to make users trusted.

Leave a Comment