MediaWiki
1.34.0
MWBasicAuthorizer.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Rest\BasicAccess
;
4
5
use
MediaWiki\Permissions\PermissionManager
;
6
use
MediaWiki\Rest\Handler
;
7
use
MediaWiki\Rest\RequestInterface
;
8
use
MediaWiki\User\UserIdentity
;
9
15
class
MWBasicAuthorizer
extends
BasicAuthorizerBase
{
17
private
$user
;
18
20
private
$permissionManager
;
21
22
public
function
__construct
(
UserIdentity
$user
,
PermissionManager
$permissionManager
) {
23
$this->user =
$user
;
24
$this->permissionManager =
$permissionManager
;
25
}
26
27
protected
function
createRequestAuthorizer
(
RequestInterface
$request,
28
Handler
$handler
29
):
BasicRequestAuthorizer
{
30
return
new
MWBasicRequestAuthorizer
( $request, $handler, $this->user,
31
$this->permissionManager );
32
}
33
}
MediaWiki\Rest\Handler
Definition:
HelloHandler.php:3
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer
A factory for MWBasicRequestAuthorizer which passes through a UserIdentity.
Definition:
MWBasicAuthorizer.php:15
MediaWiki\Rest\BasicAccess
Definition:
BasicAuthorizerBase.php:3
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition:
UserIdentity.php:32
MediaWiki\Rest\Handler
Definition:
Handler.php:9
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\$user
UserIdentity $user
Definition:
MWBasicAuthorizer.php:17
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\__construct
__construct(UserIdentity $user, PermissionManager $permissionManager)
Definition:
MWBasicAuthorizer.php:22
MediaWiki\Rest\BasicAccess\MWBasicRequestAuthorizer
The concrete implementation of basic read/write restrictions in MediaWiki.
Definition:
MWBasicRequestAuthorizer.php:15
MediaWiki\Rest\BasicAccess\BasicRequestAuthorizer
A request authorizer which checks needsReadAccess() and needsWriteAccess() in the handler and calls i...
Definition:
BasicRequestAuthorizer.php:15
MediaWiki\Permissions\PermissionManager
A service class for checking permissions To obtain an instance, use MediaWikiServices::getInstance()-...
Definition:
PermissionManager.php:47
MediaWiki\Rest\RequestInterface
A request interface similar to PSR-7's ServerRequestInterface.
Definition:
RequestInterface.php:39
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\createRequestAuthorizer
createRequestAuthorizer(RequestInterface $request, Handler $handler)
Create a BasicRequestAuthorizer to authorize the request.
Definition:
MWBasicAuthorizer.php:27
MediaWiki\Rest\BasicAccess\MWBasicAuthorizer\$permissionManager
PermissionManager $permissionManager
Definition:
MWBasicAuthorizer.php:20
MediaWiki\Rest\BasicAccess\BasicAuthorizerBase
An implementation of BasicAuthorizerInterface which creates a request-local object (a request authori...
Definition:
BasicAuthorizerBase.php:14
includes
Rest
BasicAccess
MWBasicAuthorizer.php
Generated on Thu Dec 19 2019 14:54:46 for MediaWiki by
1.8.16