MediaWiki master
|
Public Member Functions | |
__construct (ServiceOptions $options) | |
getGrantedPermissions (string $group) | |
Get a list of permissions granted to this group. | |
getGroupPermissions (array $groups) | |
Get the permissions associated with membership in a combination of groups. | |
getGroupsWithPermission (string $permission) | |
Get all the groups who have a given permission. | |
getRevokedPermissions (string $group) | |
Get a list of permissions revoked from this group. | |
groupHasPermission (string $group, string $permission) | |
Check, if the given group has the given permission. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Definition at line 40 of file GroupPermissionsLookup.php.
MediaWiki\Permissions\GroupPermissionsLookup::__construct | ( | ServiceOptions | $options | ) |
ServiceOptions | $options |
Definition at line 63 of file GroupPermissionsLookup.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\Config\ServiceOptions\get(), MediaWiki\MainConfigNames\GroupInheritsPermissions, MediaWiki\MainConfigNames\GroupPermissions, and MediaWiki\MainConfigNames\RevokePermissions.
MediaWiki\Permissions\GroupPermissionsLookup::getGrantedPermissions | ( | string | $group | ) |
Get a list of permissions granted to this group.
This must NOT be used for permissions checking as it does not check whether a permission has been revoked from this group.
string | $group | Group to get permissions of |
Definition at line 118 of file GroupPermissionsLookup.php.
MediaWiki\Permissions\GroupPermissionsLookup::getGroupPermissions | ( | array | $groups | ) |
Get the permissions associated with membership in a combination of groups.
Group-based revocation of a permission negates all group-based assignments of that permission.
string[] | $groups | internal group names |
Definition at line 162 of file GroupPermissionsLookup.php.
MediaWiki\Permissions\GroupPermissionsLookup::getGroupsWithPermission | ( | string | $permission | ) |
Get all the groups who have a given permission.
string | $permission |
Definition at line 202 of file GroupPermissionsLookup.php.
MediaWiki\Permissions\GroupPermissionsLookup::getRevokedPermissions | ( | string | $group | ) |
Get a list of permissions revoked from this group.
string | $group | Group to get revoked permissions of |
Definition at line 139 of file GroupPermissionsLookup.php.
MediaWiki\Permissions\GroupPermissionsLookup::groupHasPermission | ( | string | $group, |
string | $permission ) |
Check, if the given group has the given permission.
If you're wanting to check whether all users have a permission, use PermissionManager::isEveryoneAllowed() instead. That properly checks if it's revoked from anyone.
string | $group | Group to check |
string | $permission | Role to check |
Definition at line 82 of file GroupPermissionsLookup.php.
const MediaWiki\Permissions\GroupPermissionsLookup::CONSTRUCTOR_OPTIONS |
Definition at line 45 of file GroupPermissionsLookup.php.