AccessController
extends ApiController
in package
Access controller.
Table of Contents
- $config : AirlayConfig
- $config : AirlayConfig
- $request : Request
- $user : UserEntity
- $status : StatusPage|null
- $tokenHandler : TokenHandler|null
- __destruct() : mixed
- afterExecuteRoute() : mixed
- beforeExecuteRoute() : mixed
- getAction() : string
- Get user access level request([ 'method' => 'GET', 'url' => '/api/v3/access/get' 'params' => [ [ 'name' => 'portalId', 'type' => 'absint' 'required' => 'true' ] ]).
- guestAccessAction() : string
- Get guest access config parameter.
- hasForCmsAction() : string
- Check has access to CMS or portal.
- hasForCmsRegAction() : string
- Check has access for registration actions to CMS or portal.
- hasForPortalAction() : string
- Check has access to portal.
- hasPasswordRestoreAction() : string
- Check has access for registration actions to portal.
- indexAction() : mixed
- initialize() : void
- attachTmpFile() : Response
- firesAnRelationUpdateEvents() : void
- getId() : mixed
- getNormalizedUserId() : int|ObjectId
- getTranslator() : NativeArray
- getUserInfo() : UserEntity
- secureData() : mixed
- sendEmail() : mixed
- extractPortalFromRequest() : PortalEntity
- hasAccessForPortal() : bool
Properties
$config
public
AirlayConfig
$config
$config
public
AirlayConfig
$config
$request
public
Request
$request
$user
public
UserEntity
$user
$status
protected
StatusPage|null
$status
$tokenHandler
protected
TokenHandler|null
$tokenHandler
Methods
__destruct()
public
__destruct() : mixed
Return values
mixed —afterExecuteRoute()
public
afterExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
- $dispatcher : Dispatcher
Return values
mixed —beforeExecuteRoute()
public
beforeExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
- $dispatcher : Dispatcher
Return values
mixed —getAction()
Get user access level request([ 'method' => 'GET', 'url' => '/api/v3/access/get' 'params' => [ [ 'name' => 'portalId', 'type' => 'absint' 'required' => 'true' ] ]).
public
getAction() : string
Tags
Return values
string —200 access
guestAccessAction()
Get guest access config parameter.
public
guestAccessAction() : string
request([ 'method' => 'POST', 'url' => '/api/v3/access/guestAccess' 'params' => [ ] ]) response([ 'status' => 200, 'message' => boolean, 'code' => 0 ]).
Return values
string —hasForCmsAction()
Check has access to CMS or portal.
public
hasForCmsAction() : string
request([ 'method' => 'GET', 'url' => '/api/v3/access/hasForCms' ]).
Tags
Return values
string —hasForCmsRegAction()
Check has access for registration actions to CMS or portal.
public
hasForCmsRegAction() : string
request([ 'method' => 'GET', 'url' => '/api/v3/access/hasForCmsReg' ]).
Return values
string —hasForPortalAction()
Check has access to portal.
public
hasForPortalAction() : string
request([ 'method' => 'GET', 'url' => '/api/v3/access/hasForPortal' 'params' => [ [ 'name' => 'portalId', 'type' => 'objectId' 'required' => 'true' ] ]).
Tags
Return values
string —hasPasswordRestoreAction()
Check has access for registration actions to portal.
public
hasPasswordRestoreAction() : string
request([ 'method' => 'GET', 'url' => '/api/v3/access/hasPasswordRestore' 'params' => []).
Return values
string —indexAction()
public
indexAction() : mixed
Return values
mixed —initialize()
public
initialize() : void
Return values
void —attachTmpFile()
protected
attachTmpFile(TmpFile $tmpFile) : Response
Parameters
- $tmpFile : TmpFile
Return values
Response —firesAnRelationUpdateEvents()
protected
firesAnRelationUpdateEvents(array<string|int, mixed> $relations, ObjectId $dataSetId[, DataSetLogEntity|null $log = null ]) : void
Parameters
- $relations : array<string|int, mixed>
- $dataSetId : ObjectId
- $log : DataSetLogEntity|null = null
Return values
void —getId()
protected
getId() : mixed
Return values
mixed —getNormalizedUserId()
protected
getNormalizedUserId() : int|ObjectId
Tags
Return values
int|ObjectId —getTranslator()
protected
getTranslator([string|null $language = null ]) : NativeArray
Parameters
- $language : string|null = null
Tags
Return values
NativeArray —getUserInfo()
protected
getUserInfo() : UserEntity
Tags
Return values
UserEntity —secureData()
protected
secureData(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —sendEmail()
protected
sendEmail(string $email, string $name, string $subject, string $body) : mixed
Parameters
- $email : string
- $name : string
- $subject : string
- $body : string
Return values
mixed —extractPortalFromRequest()
private
extractPortalFromRequest() : PortalEntity
Tags
Return values
PortalEntity —hasAccessForPortal()
private
hasAccessForPortal(PortalEntity $portal, ObjectId|int $userId) : bool
Parameters
- $portal : PortalEntity
- $userId : ObjectId|int