function rules_rules_config_access

Implements hook_rules_config_access().

File

./rules.module, line 1618

Code

function rules_rules_config_access($op, $rules_config = NULL, $account = NULL) {
    // Instead of returning FALSE return nothing, so others still can grant
    // access.
    if (!isset($rules_config) || isset($account) && $account->uid != $GLOBALS['user']->uid) {
        return;
    }
    if (user_access('administer rules', $account) && ($op == 'view' || $rules_config->access())) {
        return TRUE;
    }
}