PermissionTrait

package

Default

Methods

Get minimal permission name (for read value)

getMinimalPermissionRead(): null|string
static

Response

null|string

Get the owner id of this record Used for Permission, to be extendable for each model with owner

getOwnerId(): integer|null

Response

integer|null

Get Permission data for Permission object

getPermissionData(): array
static

Response

array

Get the permission of current model

hasPermission(string $sPermission,string $sCRUD = 'read',integer $iUserID = null): boolean

Arguments

$sPermission

string

Name of the permission

$sCRUD

string

The permission detail you want to check on: 'create','read','update','delete','import' or 'export'

$iUserID

integer

User ID - if not given the one of the current user is used

Response

boolean