CRM_Core_Permission_Drupal8
class CRM_Core_Permission_Drupal8 extends CRM_Core_Permission_DrupalBase
Properties
$permissions | from CRM_Core_Permission_Base | ||
protected boolean | $_viewAdminUser | Is this user someone with access for the entire system. | from CRM_Core_Permission_DrupalBase |
protected | $_editAdminUser | from CRM_Core_Permission_DrupalBase | |
protected boolean | $_viewPermission | Am in in view permission or edit permission? | from CRM_Core_Permission_DrupalBase |
protected | $_editPermission | from CRM_Core_Permission_DrupalBase | |
protected array | $_viewPermissionedGroups | The current set of permissioned groups for the user. | from CRM_Core_Permission_DrupalBase |
protected | $_editPermissionedGroups | from CRM_Core_Permission_DrupalBase |
Methods
Translate permission.
Get the permissioned where clause for the user.
Get the permissioned where clause for the user when trying to see groups.
Get all groups from database, filtered by permissions for this user
Get group clause for this user. The group Clause filters the list of groups that the user is permitted to see in a group listing.
Given a permission string, check for access requirements
Given a roles array, check for access requirements
Get all the contact emails for users that have a specific permission.
Get all the contact emails for users that have a specific role.
No description
Get the permissions defined in the hook_civicrm_permission implementation of the given module.
Get the permissions defined in the hook_civicrm_permission implementation in all enabled CiviCRM module extensions.
Details
in CRM_Core_Permission_Base at line 58
NULL|string
translatePermission(string $perm, string $nativePrefix, array $map)
Translate permission.
in CRM_Core_Permission_DrupalBase at line 214
string
getPermission()
Get the current permission of this user.
in CRM_Core_Permission_Base at line 99
string
whereClause(int $type, array $tables, array $whereTables)
Get the permissioned where clause for the user.
in CRM_Core_Permission_Base at line 116
string
getPermissionedStaticGroupClause(int $type, array $tables, array $whereTables)
Get the permissioned where clause for the user when trying to see groups.
in CRM_Core_Permission_DrupalBase at line 77
array
group(string $groupType = NULL, bool $excludeHidden = TRUE)
Get all groups from database, filtered by permissions for this user
in CRM_Core_Permission_DrupalBase at line 150
string
groupClause(int $type, array $tables, array $whereTables)
Get group clause for this user. The group Clause filters the list of groups that the user is permitted to see in a group listing.
For example it will filter both the list on the 'Manage Groups' page and on the contact 'Groups' tab
the aclGroup hook & configured ACLs contribute to this data. If the contact is allowed to see all contacts the function will return ( 1 )
at line 50
check(string $str, null $contactID = NULL)
Given a permission string, check for access requirements
in CRM_Core_Permission_DrupalBase at line 265
bool
checkGroupRole(array $array)
Given a roles array, check for access requirements
at line 73
permissionEmails(string $permissionName)
Get all the contact emails for users that have a specific permission.
in CRM_Core_Permission_Base at line 197
roleEmails(string $roleName)
Get all the contact emails for users that have a specific role.
in CRM_Core_Permission_DrupalBase at line 281
bool
isModulePermissionSupported()
at line 95
upgradePermissions(array $permissions)
in CRM_Core_Permission_Base at line 241
static array
getModulePermissions($module)
Get the permissions defined in the hook_civicrm_permission implementation of the given module.
Note: At time of writing, this is only used with native extension-modules, so there's one, predictable calling convention (regardless of CMS).
in CRM_Core_Permission_Base at line 261
array
getAllModulePermissions(bool $descriptions = FALSE)
Get the permissions defined in the hook_civicrm_permission implementation in all enabled CiviCRM module extensions.