function rules_action_entity_query_access

Custom access callback for the data query action.

Related topics

File

modules/entity.rules.inc, line 196

Code

function rules_action_entity_query_access(RulesAbstractPlugin $element) {
    if (!rules_action_entity_createfetch_access($element)) {
        return FALSE;
    }
    $properties = entity_get_all_property_info($element->settings['type']);
    if (isset($element->settings['property']) && isset($properties[$element->settings['property']]['access callback'])) {
        return call_user_func($properties[$element->settings['property']]['access callback'], 'view', $element->settings['property'], $element->settings['type'], NULL, NULL);
    }
    return TRUE;
}