MediaWiki REL1_35
|
A collection of public static functions to deal with grants. More...
Static Public Member Functions | |
static | getGrantGroups ( $grantsFilter=null) |
Divide the grants into groups. | |
static | getGrantRights ( $grants) |
Fetch the rights allowed by a set of grants. | |
static | getGrantsLink ( $grant, $lang=null) |
Generate a link to Special:ListGrants for a particular grant name. | |
static | getGrantsWikiText ( $grantsFilter, $lang=null) |
Generate wikitext to display a list of grants. | |
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 | getValidGrants () |
List all known grants. | |
static | grantName ( $grant, $lang=null) |
Fetch the display name of the grant. | |
static | grantNames (array $grants, $lang=null) |
Fetch the display names for the grants. | |
static | grantsAreValid (array $grants) |
Test that all grants in the list are known. | |
A collection of public static functions to deal with grants.
Definition at line 25 of file MWGrants.php.
|
static |
Divide the grants into groups.
string[] | null | $grantsFilter |
Definition at line 132 of file MWGrants.php.
References $wgGrantPermissionGroups, and $wgGrantPermissions.
|
static |
Fetch the rights allowed by a set of grants.
string[] | string | $grants |
Definition at line 106 of file MWGrants.php.
References $wgGrantPermissions.
Referenced by MediaWiki\Session\BotPasswordSessionProvider\newSessionForRequest().
|
static |
Generate a link to Special:ListGrants for a particular grant name.
This should be used to link end users to a full description of what rights they are giving when they authorize a grant.
string | $grant | the grant name |
Language | string | null | $lang |
Definition at line 180 of file MWGrants.php.
References $lang, and SpecialPage\getTitleFor().
|
static |
Generate wikitext to display a list of grants.
string[] | null | $grantsFilter | If non-null, only display these grants. |
Language | string | null | $lang |
Definition at line 194 of file MWGrants.php.
References $lang, $s, and wfMessage().
|
static |
Get the list of grants that are hidden and should always be granted.
Definition at line 158 of file MWGrants.php.
References $wgGrantPermissionGroups.
Referenced by SpecialBotPasswords\getFormFields(), and SpecialBotPasswords\save().
|
static |
Map all grants to corresponding user rights.
Definition at line 41 of file MWGrants.php.
References $res, and $wgGrantPermissions.
Referenced by SpecialBotPasswords\getFormFields().
|
static |
List all known grants.
Definition at line 31 of file MWGrants.php.
References $wgGrantPermissions.
Referenced by CreateBotPassword\execute(), SpecialBotPasswords\getFormFields(), and CreateBotPassword\showGrants().
|
static |
Fetch the display name of the grant.
string | $grant | |
Language | string | null | $lang |
Definition at line 57 of file MWGrants.php.
References $lang, and wfMessage().
Referenced by grantNames().
|
static |
Fetch the display names for the grants.
string[] | $grants | |
Language | string | null | $lang |
Definition at line 89 of file MWGrants.php.
References $lang, and grantName().
|
static |
Test that all grants in the list are known.
string[] | $grants |
Definition at line 123 of file MWGrants.php.