function civicrm_entity_access in CiviCRM Entity 7.2
Same name and namespace in other branches
- 7 civicrm_entity.module \civicrm_entity_access()
Entity access callback.
Parameters
$op:
$entity:
$account: _type
Return value
bool
1 string reference to 'civicrm_entity_access'
- civicrm_entity_entity_info in ./
civicrm_entity.module - Here we declare selected CiviCRM entities to Drupal.
File
- ./
civicrm_entity.module, line 197
Code
function civicrm_entity_access($op, $entity, $account, $entity_type) {
if (is_null($account)) {
global $user;
$account = $user;
}
// now handles update as a separate op to permission
return user_access('administer CiviCRM') || civicrm_entity_op_access($op, $entity_type, $entity, $account);
}