CRM_Contact_BAO_Contact_Permission
class CRM_Contact_BAO_Contact_Permission
Properties
static bool | $useTempTable |
Methods
Set whether to use a temporary table or not when building ACL Cache
Get variable for determining if we should use Temporary Table or not
Check which of the given contact IDs the logged in user has permissions for the operation type according to: - general permissions (e.g. 'edit all contacts') - deletion status (unless you have 'access deleted contacts') - ACL - permissions inherited through relationships (also second degree if enabled)
Check if the logged in user has permissions for the operation type.
Fill the acl contact cache for this ACLed contact id if empty.
No description
Generate acl subquery that can be placed in the WHERE clause of a query or the ON clause of a JOIN.
Filter a list of contact_ids by the ones that the currently active user as a permissioned relationship with
No description
Details
at line 44
static
setUseTemporaryTable(bool $useTemporaryTable = TRUE)
Set whether to use a temporary table or not when building ACL Cache
at line 52
static bool
getUseTemporaryTable()
Get variable for determining if we should use Temporary Table or not
at line 73
static array
allowList(array $contact_ids, int $type = CRM_Core_Permission::VIEW)
Check which of the given contact IDs the logged in user has permissions for the operation type according to: - general permissions (e.g. 'edit all contacts') - deletion status (unless you have 'access deleted contacts') - ACL - permissions inherited through relationships (also second degree if enabled)
at line 159
static bool
allow(int $id, int|string $type = CRM_Core_Permission::VIEW)
Check if the logged in user has permissions for the operation type.
at line 218
static
cache(int $userID, int|string $type = CRM_Core_Permission::VIEW, bool $force = FALSE)
Fill the acl contact cache for this ACLed contact id if empty.
at line 323
static array
cacheClause(string $contactAlias = 'contact_a')
at line 369
static string|null
cacheSubquery()
Generate acl subquery that can be placed in the WHERE clause of a query or the ON clause of a JOIN.
This is specifically for VIEW operations.
at line 391
static array
relationshipList(array $contact_ids, int $type)
Filter a list of contact_ids by the ones that the currently active user as a permissioned relationship with