You are here

public function Rule::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 RulesContainerPlugin::access

See also

rules_config_access()

File

includes/rules.plugins.inc, line 266
Contains plugin info and implementations not needed for rule evaluation.

Class

Rule
An actual rule.

Code

public function access() {
  return (!isset($this->conditions) || $this->conditions
    ->access()) && parent::access();
}