|
| __construct (PermissionManager $permissionManager, LoggerInterface $logger) |
|
| authorize ( $oldContent, $newContent, $user, $title) |
| Given a ZObject edit or creation, requests the necessary rights and checks whether the user has them all.
|
|
| getRequiredCreateRights ( $content, $title) |
| Given a new ZObject content object, uses its type and zid information to return the array of user rights that must be present in order to successfully authorize the creation.
|
|
| getRequiredEditRights ( $fromContent, $toContent, $title) |
| Given a ZObject edit, matches with the available authorization rules and returns the array of user rights that must be present in order to successfully authorize the edit.
|
|
| setLogger (LoggerInterface $logger) |
| @inheritDoc
|
|
| getLogger () |
| @inheritDoc
|
|
◆ __construct()
MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::__construct |
( |
PermissionManager | $permissionManager, |
|
|
LoggerInterface | $logger ) |
- Parameters
-
PermissionManager | $permissionManager | |
LoggerInterface | $logger | |
◆ authorize()
MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::authorize |
( |
| $oldContent, |
|
|
| $newContent, |
|
|
| $user, |
|
|
| $title ) |
Given a ZObject edit or creation, requests the necessary rights and checks whether the user has them all.
Fails if any of the rights are not present in the user groups.
- Parameters
-
ZObjectContent | null | $oldContent | |
ZObjectContent | $newContent | |
User | $user | |
Title | $title | |
- Returns
- AuthorizationStatus
◆ getRequiredCreateRights()
MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::getRequiredCreateRights |
( |
| $content, |
|
|
| $title ) |
Given a new ZObject content object, uses its type and zid information to return the array of user rights that must be present in order to successfully authorize the creation.
- Parameters
-
ZObjectContent | $content | |
Title | $title | |
- Returns
- array
◆ getRequiredEditRights()
MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::getRequiredEditRights |
( |
| $fromContent, |
|
|
| $toContent, |
|
|
| $title ) |
Given a ZObject edit, matches with the available authorization rules and returns the array of user rights that must be present in order to successfully authorize the edit.
- Parameters
-
ZObjectContent | $fromContent | |
ZObjectContent | $toContent | |
Title | $title | |
- Returns
- array
The documentation for this class was generated from the following file: