function RulesContainerPlugin::access

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

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 2369

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;
}