WikiLambda
MediaWiki WikiLambda extension
Loading...
Searching...
No Matches
MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization Class Reference
+ Inheritance diagram for MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization:
+ Collaboration diagram for MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization:

Public Member Functions

 __construct (LoggerInterface $logger)
 
 authorize ( $oldContent, $newContent, $authority, $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
 

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::__construct ( LoggerInterface $logger)
Parameters
LoggerInterface$logger

Member Function Documentation

◆ authorize()

MediaWiki\Extension\WikiLambda\Authorization\ZObjectAuthorization::authorize ( $oldContent,
$newContent,
$authority,
$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
Authority$authority
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
string[]

◆ 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
string[]

The documentation for this class was generated from the following file: