KMP PHP API Reference

AuthorizationApprovalsTablePolicy extends BasePolicy
in package

Table-level authorization policy for AuthorizationApprovals.

Implements two-tier access: personal queue (approver_id filter) and administrative access (full visibility). Approvers see their assigned items; administrators see all queues.

Tags
see
BasePolicy

For inherited RBAC functionality

see

/docs/5.6.5-activity-security-patterns.md For approval queue scoping pattern

Table of Contents

Methods

before()  : bool|null
Check if $user is a super user and can skip auth with an auto True
canAdd()  : bool
Check if $user can add RolesPermissions
canAllQueues()  : bool
Check if user has administrative access to all approval queues.
canDelete()  : bool
Check if $user can delete RolesPermissions
canEdit()  : bool
Check if $user can edit RolesPermissions
canGridData()  : bool
Check if $user can view role
canIndex()  : bool
Check if $user can view role
canMyQueue()  : bool
Check if user can access their personal approval queue.
canMyQueueGridData()  : bool
Check if user can access their personal approval queue grid data.
canView()  : bool
Check if $user can view RolesPermissions
canViewGridData()  : bool
Check if user can view approval queue data for a specific approver.
canViewPrivateNotes()  : bool
Check if $user can view hidden
scopeIndex()  : Query
Scope index queries - admins see all, approvers see own.
scopeMobileApprove()  : Query
Scope mobile approve action - admins see all, approvers see own.
scopeMobileApproveAuthorizations()  : Query
Scope mobile approve authorizations to user's assigned items.
scopeMobileDeny()  : Query
Scope mobile deny action - admins see all, approvers see own.
scopeMyQueue()  : Query
Scope personal approval queue to user's assigned items.
scopeMyQueueGridData()  : Query
Scope personal approval queue grid data to user's assigned items.
scopeView()  : Query
Scope view queries - admins see all, approvers see own.
scopeViewGridData()  : Query
Scope view grid data - admins see all, approvers see own.
_getBranchIdsForPolicy()  : array<string|int, mixed>|null
Check if $user can view hidden
_getPermissions()  : bool
Check if $user can view hidden
_getPolicies()  : bool
Check if $user can view hidden
_hasPolicy()  : bool
Check if $user can view hidden
_hasPolicyForUrl()  : bool
Check if $user can view hidden
_isSuperUser()  : bool
Check if $user is a super user

Methods

before()

Check if $user is a super user and can skip auth with an auto True

public before(KmpIdentityInterface $user, mixed $resource, string $action) : bool|null
Parameters
$user : KmpIdentityInterface

The user.

$resource : mixed

The resource.

$action : string

The action.

Return values
bool|null

scopeMobileApproveAuthorizations()

Scope mobile approve authorizations to user's assigned items.

public scopeMobileApproveAuthorizations(KmpIdentityInterface $user, Query $query) : Query
Parameters
$user : KmpIdentityInterface

The requesting user

$query : Query

The base query

Return values
Query

Query filtered to user's approver_id

_getBranchIdsForPolicy()

Check if $user can view hidden

protected _getBranchIdsForPolicy(KmpIdentityInterface $user, string $policyMethod) : array<string|int, mixed>|null
Parameters
$user : KmpIdentityInterface

The user.

$policyMethod : string
Return values
array<string|int, mixed>|null

_hasPolicy()

Check if $user can view hidden

protected _hasPolicy(KmpIdentityInterface $user, string $policyMethod, BaseEntity|Table $entity[, int|null $branchId = null ][, mixed $grantSource = null ]) : bool
Parameters
$user : KmpIdentityInterface

The user.

$policyMethod : string
$entity : BaseEntity|Table
$branchId : int|null = null
$grantSource : mixed = null
Return values
bool

_hasPolicyForUrl()

Check if $user can view hidden

protected _hasPolicyForUrl(KmpIdentityInterface $user, string $policyMethod, array<string|int, mixed> $urlProps[, int|null $branchId = null ][, mixed $grantSource = null ]) : bool
Parameters
$user : KmpIdentityInterface

The user.

$policyMethod : string
$urlProps : array<string|int, mixed>
$branchId : int|null = null
$grantSource : mixed = null
Return values
bool

        
On this page

Search results