KMP PHP API Reference

AwardsTablePolicy extends BasePolicy
in package

Table-level authorization policy for Awards data operations.

Provides query scoping based on user branch permissions and recommendation approval authority. Filters awards to show only those at levels the user can approve.

See /docs/5.2.6-awards-table-policy.md for complete documentation.

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
canDelete()  : bool
Check if $user can delete RolesPermissions
canEdit()  : bool
Check if $user can edit RolesPermissions
canExport()  : bool
canGridData()  : bool
Check if $user can view role
canIndex()  : bool
Check if $user can view role
canView()  : bool
Check if $user can view RolesPermissions
canViewPrivateNotes()  : bool
Check if $user can view hidden
scopeGridData()  : mixed
Check if user can access gridData scope (Dataverse grid data endpoint) Uses the same authorization scope as the standard index action
scopeIndex()  : SelectQuery
Apply query scoping based on user branch permissions and approval authority.
_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

scopeGridData()

Check if user can access gridData scope (Dataverse grid data endpoint) Uses the same authorization scope as the standard index action

public scopeGridData(KmpIdentityInterface $user, mixed $query) : mixed
Parameters
$user : KmpIdentityInterface

User

$query : mixed

Query

scopeIndex()

Apply query scoping based on user branch permissions and approval authority.

public scopeIndex(KmpIdentityInterface $user, SelectQuery $query) : SelectQuery

Filters awards by authorized branches and approval levels derived from RecommendationPolicy canApproveLevel* methods.

Parameters
$user : KmpIdentityInterface

The authenticated user requesting access

$query : SelectQuery

The Awards table query to be scoped

Return values
SelectQuery

Scoped query with branch and level filtering

_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