You are here

public function RulesContainerPlugin::access in Rules 7.2

Whether the currently logged in user has access to all configured elements.

Note that this only checks whether the current user has permission to all configured elements, but not whether a user has access to configure Rule configurations in general. Use rules_config_access() for that.

Use this to determine access permissions for configuring or triggering the execution of certain configurations independent of the Rules UI.

Overrides RulesPlugin::access

See also

rules_config_access()

1 call to RulesContainerPlugin::access()
Rule::access in includes/rules.plugins.inc
Whether the currently logged in user has access to all configured elements.
1 method overrides RulesContainerPlugin::access()
Rule::access in includes/rules.plugins.inc
Whether the currently logged in user has access to all configured elements.

File

includes/rules.core.inc, line 2349
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesContainerPlugin
Base class for ContainerPlugins like Rules, Logical Operations or Loops.

Code

public function access() {
  foreach ($this->children as $key => $child) {
    if (!$child
      ->access()) {
      return FALSE;
    }
  }
  return TRUE;
}