Introduction

This section contains notes about how to integrate with Rules.

Note: This only work on individual nodes. The rules for access control that you set up will not be executed unless you have enabled per content node access control settings.

Rules integrations example

In this example, there will be two user roles: “writer” and “editor”. There will also be two users: A writer named “Bob” and an editor named “Ben”. There will also be a third user named “Alice” that will not belong to any of there roles. We shall set up a workflow where “Bob” creates content, and when that content is saved, only users with the “editor” user role (e.g. “Ben”) will be allowed to see it.

Set up:

Create the rules:

ahelp_tab.png
Adding a new rule

This sets up a new rule named “editor oversight” that triggers when a new node is saved.

This sets up a contition for following the rule. The rule is only followed when the user with the role “writer” triggers an event that matches “After saving new contents”.

The final step adds an action that happens when the rule is triggered and the conditions are met.

Verify that it works: