Extension:RestrictiveRights

Usage
MW group permissions are inherited so that true always overrides false. This reverses that behavior, so that changing $wgGroupPermissions to false in LocalSettings always overrides true. This is useful when creating new groups with subsets of the permissions granted to the 'user' group. For example, consider a school with a wiki. The admin wants to let teachers create accounts for each other and for students, but doesn't want students to be able to create additional accounts. This can be done by creating a supergroup 'teacher' with more rights than regular users (students), but it requires remembering to set those permissions each time a teacher is created. With RestrictiveRights, you would do it like this: Here, the extra group is 'student', and student permission to create accounts is explicitly blocked in LocalSettings.php (and you have to remember to put new student accounts in group 'student' ). Which way is optimal just depends on what you want the default to be. Note that using RestrictiveRights does not prevent doing it the other way, but it allows you the choice.

Note that this will only apply to groups that are in the groups table in the MW schema, i.e. sysop, bureaucrat, and any custom groups.

Installation
Save code as RestrictiveRights.php. Adjust LocalSettings.php