Opas:$wgGroupPermissions

This page is a translated version of the page Manual:$wgGroupPermissions and the translation is 55% complete.
User rights, access control and monitoring: $wgGroupPermissions
Käytä tätä asettaaksesi käyttöoikeudet ryhmille ja näiden ryhmien käyttäjille.
Introduced in version:1.5.0 (r9367)
Removed in version:still in use
Allowed values:(Boolen arvojen monimutkainen taulukko.)
Default value:Katso alta.

Tiedot

$wgGroupPermissions is a two-dimensional array indexed by user group and available permissions. The value can be either true to grant the permission or false if it should not be granted.

Those permissions, which are granted with $wgGroupPermissions, are always cumulative. If a user is member of different groups, then the user will get a right if it is granted to at least one of these groups even if it is not granted to their other groups. In other words, If one of the user's groups has a right, then it is not possible to take the right away using $wgGroupPermissions. Instead use $wgRevokePermissions to revoke permissions.

Esimerkki

$wgGroupPermissions['user']['edit'] = true;

This gives all registered users the ability to edit pages.

Mukautetut käyttäjäryhmät

Voit myös määrittää omat käyttäjäryhmäsi. Käyttäjäryhmien nimet voivat olla enintään 255 merkkiä pitkiä.[1]The groups, which have been defined either in DefaultSettings.php or in LocalSettings.php , can be assigned to users through the wiki Special:Userrights interface.

Esimerkki (ennen REL 1.24:ää tai tiedostossa $1)

# Aloita määrittämällä oletusoikeudet ryhmästä "automaattisesti vahvistettu"
$wgGroupPermissions['trustworthy'] = $wgGroupPermissions['autoconfirmed'];
# Lisää käyttöoikeudet ryhmästä "botti"
$wgGroupPermissions['trustworthy'] = array_merge(
    $wgGroupPermissions['trustworthy'],
    $wgGroupPermissions['bot']
    );
# Nyt muokkaa näitä oikeuksia:
$wgGroupPermissions['trustworthy']['delete'] = true;
$wgGroupPermissions['trustworthy']['protect'] = true;
$wgGroupPermissions['trustworthy']['patrol'] = true;

Tämä luo ryhmän nimeltä "trustworthy".

Now add human readable names for your newly created group to the wiki for the "trustworthy" group, e.g. on page "MediaWiki:Group-trustworthy" in plural "Trustworthy editors" and on page "MediaWiki:Group-trustworthy-member" in singular "Trustworthy editor". This is an optional but recommended step.

Käyttäjillä, jotka ovat tässä ryhmässä, on samat oikeudet kuin ryhmillä "automaattisesti vahvistettu" ja "botti". Lisäksi he voivat poistaa ja suojata sivuja ja partioida muokkauksia.

Katso perusteelliset ohjeet sivulla Opas:Käyttöoikeudet .

  Varoitus: Functionality to make specific pages inaccessible has not been extensively tested for security. Use at your own risk!

Oletusarvot

Oletusarvot vaihtelevat versiosta toiseen. You may find the one which apply to your mediawiki setup in DefaultSettings.php . Lisätietoja varten vieraile sivulla Opas:Käyttöoikeudet .

Use by extensions

Some extensions, such as RenameUser or CheckUser , add new rights which can be configured and assigned in the same manner.

Examples

Since REL 1.25, you can do the following in extension.json :

MediaWiki version:
1.25
Gerrit change 166705

Assigning a new permission to an existing group

	"GroupPermissions": {
		"user": {
			"edit": true
		}
	},

Adding a new group

	"GroupPermissions": {
		"trustworthy": {
			"delete": true,
			"protect": true,
			"patrol": true
		}
	},


Katso myös

Huomioita

  1. See length of column ug_group in the user_groups table.