Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Manual/User rights
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Removing predefined groups === <!--T:48--> </translate> <translate><!--T:49--> MediaWiki out of the box comes with a number of predefined groups.</translate> <translate><!--T:50--> Most of these groups can be removed by unsetting the according array keys, among them [ ]</span></tvar>|''group-name''}}.</translate> <translate><!--T:51--> For details, see below.</translate> <translate> ==== Example ==== <!--T:52--> </translate> <translate><!--T:53--> This example will eliminate the <tvar name=1><code>bureaucrat</code></tvar> group entirely.</translate> <translate><!--T:54--> It is necessary to ensure that all six of these variables are unset for any group that one wishes to remove from being listed at <tvar name=List>[[Special:ListGroupRights]]</tvar>; however, merely unsetting <tvar name=1><code>$wgGroupPermissions</code></tvar> will suffice to remove it from <tvar name=UserRights>[[Special:UserRights]]</tvar>.</translate> <syntaxhighlight lang="php" copy> unset( $wgGroupPermissions['bureaucrat'] ); unset( $wgRevokePermissions['bureaucrat'] ); unset( $wgAddGroups['bureaucrat'] ); unset( $wgRemoveGroups['bureaucrat'] ); unset( $wgGroupsAddToSelf['bureaucrat'] ); unset( $wgGroupsRemoveFromSelf['bureaucrat'] ); </syntaxhighlight> <translate><!--T:267--> This code will not work if any extension that modifies the default rights for the <tvar name=2><code>bureaucrat</code></tvar> group, such as <tvar name=1></tvar>, is installed.</translate> <translate><!--T:268--> More broadly, to disable a user group created by an extension, the above code needs to run after all extensions have been registered.</translate> <translate><!--T:269--> This used to be possible by registering an extension function in <tvar name=1><code>LocalSettings.php</code></tvar>:</translate> <syntaxhighlight lang="php" copy> $wgExtensionFunctions[] = function() use ( &$wgGroupPermissions ) { unset( $wgGroupPermissions['oversight'] ); unset( $wgGroupPermissions['flow-bot'] ); }; </syntaxhighlight> <translate> <!--T:270--> However, this '''no longer works reliably''' due to <tvar name=1>[[phab:T275334|T275334]]</tvar>.</translate> {{Note|type=warn|1= '''<translate><!--T:202--> Note on the group called <tvar name=1><code>user</code></tvar></translate>''' <translate><!--T:203--> With the above mechanism, you can remove the groups <tvar name=2></tvar>, which - if used - can be assigned through the usual [[<tvar name=1>Special:MyLanguage/Help:User rights and groups</tvar>|user permission system]].</translate> <translate><!--T:204--> However, it is currently impossible to remove the <tvar name=1><code>user</code></tvar> group.</translate> <translate><!--T:205--> This group is ''not'' assigned through the usual permission system.</translate> <translate><!--T:206--> Instead, every registered user automatically is a member of that group.</translate> <translate><!--T:207--> This is hardcoded in MediaWiki and currently cannot be changed easily.</translate> }} <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)