CRM_Contact_BAO_Contact_Permission
class CRM_Contact_BAO_Contact_Permission
Methods
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 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 52
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 138
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 197
static
cache(int $userID, int|string $type = CRM_Core_Permission::VIEW, bool $force = FALSE)
Fill the acl contact cache for this contact id if empty.
at line 268
static array
cacheClause(string $contactAlias = 'contact_a')
at line 314
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 333
static array
relationshipList(array $contact_ids)
Filter a list of contact_ids by the ones that the currently active user as a permissioned relationship with