Arikaim CMS

AccessInterface

Auth interface

Table of Contents

Constants

CONTROL_PANEL  = 'ControlPanel'
Control panel permission
DELETE  = ['delete']
EXECUTE  = ['execute']
FULL  = ['read', 'write', 'delete', 'execute']
Full permissions
READ  = ['read']
Read
WRITE  = ['write']

Methods

addPermission()  : bool
Add permission item.
getControlPanelPermission()  : string
Control panel permission name
getFullPermissions()  : array<string|int, mixed>
Full Permissions
getUserPermissions()  : mixed
Get user permissions list
hasAccess()  : bool
Check access
hasControlPanelAccess()  : bool
Check if current loged user have control panel access
resolvePermissionName()  : array<string|int, mixed>
Resolve permission full name name:type

Constants

CONTROL_PANEL

Control panel permission

public mixed CONTROL_PANEL = 'ControlPanel'

FULL

Full permissions

public mixed FULL = ['read', 'write', 'delete', 'execute']

Methods

addPermission()

Add permission item.

public addPermission(string $name[, string|null $title = null ][, string|null $description = null ][, string|null $extension = null ]) : bool
Parameters
$name : string
$title : string|null = null
$description : string|null = null
$extension : string|null = null
Return values
bool

getControlPanelPermission()

Control panel permission name

public getControlPanelPermission() : string
Return values
string

getFullPermissions()

Full Permissions

public getFullPermissions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getUserPermissions()

Get user permissions list

public getUserPermissions([int|null $authId = null ]) : mixed
Parameters
$authId : int|null = null

hasAccess()

Check access

public hasAccess(string|int $name[, string|array<string|int, mixed>|null $type = null ][, int|null $authId = null ]) : bool
Parameters
$name : string|int

Permission name

$type : string|array<string|int, mixed>|null = null

PermissionType (read,write,execute,delete)

$authId : int|null = null
Return values
bool

hasControlPanelAccess()

Check if current loged user have control panel access

public hasControlPanelAccess([int|null $authId = null ]) : bool
Parameters
$authId : int|null = null
Return values
bool

resolvePermissionName()

Resolve permission full name name:type

public resolvePermissionName(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

        
On this page

Search results