You are here

function rules_config_access in Rules 7.2

Access callback for dealing with Rules configurations.

See also

entity_access()

4 string references to 'rules_config_access'
hook_rules_ui_menu_alter in ./rules.api.php
Allows modules to alter or to extend the provided Rules UI.
RulesUIController::config_menu in ui/ui.controller.inc
Generates menu items to manipulate rules configurations.
rules_entity_info in ./rules.module
Implements hook_entity_info().
rules_scheduler_rules_ui_menu_alter in rules_scheduler/rules_scheduler.module
Implements hook_rules_ui_menu_alter().

File

./rules.module, line 1565
Rules engine module.

Code

function rules_config_access($op, $rules_config = NULL, $account = NULL) {
  if (user_access('bypass rules access', $account)) {
    return TRUE;
  }

  // Allow modules to grant / deny access.
  $access = module_invoke_all('rules_config_access', $op, $rules_config, $account);

  // Only grant access if at least one module granted access and no one denied
  // access.
  if (in_array(FALSE, $access, TRUE)) {
    return FALSE;
  }
  elseif (in_array(TRUE, $access, TRUE)) {
    return TRUE;
  }
  return FALSE;
}