Documentation

Privilege
in package

Privilege basic class.

Tags
copyright

YetiForce S.A.

license

YetiForce Public License 6.5 (licenses/LicenseEN.txt or yetiforce.com)

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

$isPermittedLevel  : mixed
$interpreter  : string
Interpreter for privilege.
checkPermission()  : bool
Function to check permission for a Module/Action/Record.
isPermitted()  : bool
Invokes function to check permission .
isPermittedBySharing()  : mixed
isReadPermittedBySharing()  : mixed
Function to check if the currently logged in user has Read Access due to Sharing for the specified record.
isReadWritePermittedBySharing()  : mixed
Function to check if the currently logged in user has Write Access due to Sharing for the specified record.
setAllUpdater()  : mixed
setPermissionInterpreter()  : void
Sets interpreter.
setUpdater()  : mixed
Add to global permissions update queue.

Properties

$isPermittedLevel

public static mixed $isPermittedLevel

$interpreter

Interpreter for privilege.

private static string $interpreter

Methods

checkPermission()

Function to check permission for a Module/Action/Record.

public static checkPermission(string $moduleName[, string $actionName = null ][, bool|int $record = false ][, mixed $userId = false ]) : bool
Parameters
$moduleName : string
$actionName : string = null
$record : bool|int = false
$userId : mixed = false
Return values
bool

isPermitted()

Invokes function to check permission .

public static isPermitted(string $moduleName[, string $actionName = null ][, bool|int $record = false ][, mixed $userId = false ]) : bool
Parameters
$moduleName : string
$actionName : string = null
$record : bool|int = false
$userId : mixed = false
Return values
bool

isPermittedBySharing()

public static isPermittedBySharing(mixed $moduleName, mixed $tabId, mixed $actionId, mixed $recordId, mixed $userId) : mixed
Parameters
$moduleName : mixed
$tabId : mixed
$actionId : mixed
$recordId : mixed
$userId : mixed
Return values
mixed

isReadPermittedBySharing()

Function to check if the currently logged in user has Read Access due to Sharing for the specified record.

public static isReadPermittedBySharing( $moduleName,  $tabId,  $actionId,  $recordId, mixed $userId) : mixed
Parameters
$moduleName :

-- Module Name:: Type varchar

$tabId :

-- Tab Id:: Type integer

$actionId :

-- Action Id:: Type integer

$recordId :

-- Record Id:: Type integer

$userId : mixed
Tags
returns

yes or no. If Yes means this action is allowed for the currently logged in user. If no means this action is not allowed for the currently logged in user

Return values
mixed

isReadWritePermittedBySharing()

Function to check if the currently logged in user has Write Access due to Sharing for the specified record.

public static isReadWritePermittedBySharing( $moduleName,  $tabId,  $actionId, mixed $recordId, mixed $userId) : mixed
Parameters
$moduleName :

-- Module Name:: Type varchar

$tabId :

-- Tab Id:: Type integer

$actionId :

-- Action Id:: Type integer

$recordId : mixed
$userId : mixed
Tags
returns

yes or no. If Yes means this action is allowed for the currently logged in user. If no means this action is not allowed for the currently logged in user

Return values
mixed

setAllUpdater()

public static setAllUpdater() : mixed
Return values
mixed

setPermissionInterpreter()

Sets interpreter.

public static setPermissionInterpreter(string $className) : void
Parameters
$className : string
Return values
void

setUpdater()

Add to global permissions update queue.

public static setUpdater(string $moduleName[, int $record = false ][, int $priority = false ][, int $type = 1 ]) : mixed
Parameters
$moduleName : string

Module name

$record : int = false

If type = 1 starting number if type = 0 record ID

$priority : int = false
$type : int = 1
Return values
mixed

        

Search results