FacturaScripts

ControllerPermissions extends ControllerPermissions
in package

Class created by Core/Internal/PluginsDeploy

Table of Contents

Properties

$accessMode  : int
$allowAccess  : bool
$allowDelete  : bool
$allowExport  : bool
$allowImport  : bool
$allowUpdate  : bool
$onlyOwnerData  : bool

Methods

__construct()  : mixed
set()  : void
Manually set permissions for this controller.
setParams()  : void
Set multiple permission parameters from an associative array.
getUserAccess()  : array<string|int, mixed>
Get user access rules from cache or database.

Properties

$accessMode

public int $accessMode = self::DEFAULT_ACCESS_MODE

Access level for the user (1 = basic, 99 = admin)

$onlyOwnerData

public bool $onlyOwnerData = false

Whether the user can only see their own data

Methods

__construct()

public __construct([User|null $user = null ][, string|null $pageName = null ]) : mixed
Parameters
$user : User|null = null
$pageName : string|null = null

set()

Manually set permissions for this controller.

public set(bool $access, int $accessMode, bool $delete, bool $update[, bool $onlyOwner = false ]) : void
Parameters
$access : bool

Whether to allow access

$accessMode : int

The access level

$delete : bool

Whether to allow delete operations

$update : bool

Whether to allow update operations

$onlyOwner : bool = false

Whether to restrict to owner data only

setParams()

Set multiple permission parameters from an associative array.

public setParams(array<string|int, mixed> $params) : void
Parameters
$params : array<string|int, mixed>

Array with permission property names as keys

getUserAccess()

Get user access rules from cache or database.

protected getUserAccess(string $nick, string $pageName) : array<string|int, mixed>
Parameters
$nick : string
$pageName : string
Return values
array<string|int, mixed>

        
On this page

Search results