4 protected function setUp() {
8 'wgGrantPermissions' => [
9 'hidden1' => [
'read' =>
true,
'autoconfirmed' =>
false ],
10 'hidden2' => [
'autoconfirmed' =>
true ],
11 'normal' => [
'edit' =>
true ],
12 'normal2' => [
'edit' =>
true,
'create' =>
true ],
13 'admin' => [
'protect' =>
true,
'delete' =>
true ],
15 'wgGrantPermissionGroups' => [
16 'hidden1' =>
'hidden',
17 'hidden2' =>
'hidden',
18 'normal' =>
'normal-group',
29 [
'hidden1',
'hidden2',
'normal',
'normal2',
'admin' ],
40 'hidden1' => [
'read' ],
41 'hidden2' => [
'autoconfirmed' ],
42 'normal' => [
'edit' ],
43 'normal2' => [
'edit',
'create' ],
44 'admin' => [
'protect',
'delete' ],
62 [
'hidden1', [
'read' ] ],
63 [ [
'hidden1',
'hidden2',
'hidden3' ], [
'read',
'autoconfirmed' ] ],
64 [ [
'normal1',
'normal2' ], [
'edit',
'create' ] ],
80 [ [
'hidden1',
'hidden2' ],
true ],
81 [ [
'hidden1',
'hidden3' ],
false ],
98 'hidden' => [
'hidden1',
'hidden2' ],
99 'normal-group' => [
'normal' ],
100 'other' => [
'normal2' ],
101 'admin' => [
'admin' ],
103 [ [
'hidden1',
'normal' ], [
104 'hidden' => [
'hidden1' ],
105 'normal-group' => [
'normal' ],
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
testGetValidGrants()
MWGrants::getValidGrants.
static provideGetGrantRights()
testGetRightsByGrant()
MWGrants::getRightsByGrant.
testGetGrantGroups( $grants, $expect)
provideGetGrantGroups MWGrants::getGrantGroups
testGetGrantRights( $grants, $rights)
provideGetGrantRights MWGrants::getGrantRights
testGrantsAreValid( $grants, $valid)
provideGrantsAreValid MWGrants::grantsAreValid
static provideGetGrantGroups()
testGetHiddenGrants()
MWGrants::getHiddenGrants.
static provideGrantsAreValid()
static getHiddenGrants()
Get the list of grants that are hidden and should always be granted.
static getRightsByGrant()
Map all grants to corresponding user rights.
static grantsAreValid(array $grants)
Test that all grants in the list are known.
static getGrantRights( $grants)
Fetch the rights allowed by a set of grants.
static getGrantGroups( $grantsFilter=null)
Divide the grants into groups.
static getValidGrants()
List all known grants.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
processing should stop and the error should be shown to the user * false