Manual:$wgGroupPermissions
User rights, access control and monitoring: $wgGroupPermissions | |
---|---|
Utilize isto para definir as permissões de acesso para os grupos e para os utilizadores nestes grupos. |
|
Introduzida na versão: | 1.5.0 (r9367) |
Removida na versão: | ainda em uso |
Valores permitidos: | (Matriz complexa de valores boolianos.) |
Valor por omissão: | Veja abaixo. |
Outras configurações: Lista Alfabética | Lista por Função |
Detalhes
$wgGroupPermissions é uma matriz bidimensional indexada pelo grupo de utilizadores e pelas permissões disponíveis. O valor pode ser TRUE para conceder a permissão ou FALSE se não deverá ser concedido.
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.
Exemplo
Versões do MediaWiki: | 1.5 – 1.24 |
$wgGroupPermissions['user']['edit'] = true;
Versão MediaWiki: | ≥ 1.25 Gerrit change 166705 |
Since REL 1.25 do in extension.json
:
"GroupPermissions": {
"user": {
"edit": true
}
},
Isto oferece a todos os utilizadores registados a capacidade para editar as páginas.
Grupos de utilizador personalizados
Também pode definir os seus próprios grupos de utilizador. Os nomes de grupo de utilizador não podem ter mais de 255 carateres.[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.
Exemplo
# Start with assigning the default permissions from group "autoconfirmed"
$wgGroupPermissions['trustworthy'] = $wgGroupPermissions['autoconfirmed'];
# Add the permissions from group "bot"
$wgGroupPermissions['trustworthy'] = array_merge(
$wgGroupPermissions['trustworthy'],
$wgGroupPermissions['bot']
);
# Now modify these rights:
$wgGroupPermissions['trustworthy']['delete'] = true;
$wgGroupPermissions['trustworthy']['protect'] = true;
$wgGroupPermissions['trustworthy']['patrol'] = true;
Versão MediaWiki: | ≥ 1.25 |
Example in extension.json (since REL 1.25)
"GroupPermissions": {
"trustworthy": {
"delete": true,
"protect": true,
"patrol": true
}
},
This creates a group called "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.
Users of that group have the same permissions as users from the groups "autoconfirmed" and "bot". Additionally, they will be able to delete and protect pages, and to patrol edits.
For in-depth documentation, see Manual:Privilégios de Utilizador .
Valores predefinidos
Os valores predefinidos variam de versão em versão. You may find the one which apply to your mediawiki setup in DefaultSettings.php . Para mais informação, visite Manual:Privilégios de Utilizador .
Utilizado pelas extensões
Algumas extensões, tais como RenameUser ou CheckUser , acrescentam novas permissões que podem ser configuradas e atribuídas da mesma maneira.
Consulte também
Notas de Rodapé
- ↑ See length of column ug_group in the user_groups table.