Bitrix API

AccessController extends BaseAccessController

Table of Contents

Methods

__construct()  : mixed
batchCheck()  : array<string|int, mixed>
can()  : bool
check()  : bool
Checking access rights by action
checkByItemId()  : bool
checkByValue()  : bool
checkCompleteRight()  : bool
Returns true if user have full access to right <b>$action</b> or false otherwise
getAllowedDefaultStoreId()  : int|null
Allowed default store id.
getCurrent()  : self
getEntityFilter()  : array<string|int, mixed>|null
Get filter for entity.
getInstance()  : static
getPermissionValue()  : array<string|int, mixed>|int|null
getUser()  : AccessibleUser
hasIblockAccess()  : bool
isAdmin()  : mixed

Methods

__construct()

public __construct(int $userId) : mixed
Parameters
$userId : int
Tags
inheritDoc

can()

public static can(mixed $userId, string $action[, mixed $itemId = null ][, mixed $params = null ]) : bool
Parameters
$userId : mixed
$action : string
$itemId : mixed = null
$params : mixed = null
Return values
bool

checkByItemId()

public checkByItemId(string $action[, int $itemId = null ][, mixed $params = null ]) : bool
Parameters
$action : string
$itemId : int = null
$params : mixed = null
Return values
bool

checkByValue()

public checkByValue(string $action, string $value) : bool
Parameters
$action : string
$value : string
Return values
bool

checkCompleteRight()

Returns true if user have full access to right <b>$action</b> or false otherwise

public checkCompleteRight(string $action) : bool
Parameters
$action : string
Return values
bool

getAllowedDefaultStoreId()

Allowed default store id.

public getAllowedDefaultStoreId() : int|null

If the default store is unavailable, the first available warehouse is returned.

Return values
int|null

returns null if there is no access to any warehouse.

getEntityFilter()

Get filter for entity.

public getEntityFilter(string $action, string $entityName[, mixed $params = null ]) : array<string|int, mixed>|null
Parameters
$action : string
$entityName : string

recommended to use the name of the tablet class.

$params : mixed = null
Tags
inheritDoc
Return values
array<string|int, mixed>|null

is filter not available - return null.

getInstance()

public static getInstance(mixed $userId) : static
Parameters
$userId : mixed
Return values
static

getPermissionValue()

public getPermissionValue(string $action) : array<string|int, mixed>|int|null
Parameters
$action : string
Return values
array<string|int, mixed>|int|null

hasIblockAccess()

public hasIblockAccess(string $action) : bool
Parameters
$action : string
Return values
bool

        
On this page

Search results