The workflow access module grants permission based on states. In combination with the revisioning module the state of the node might change while the published revision remains as is and should be visible. This patch adds a checkbox "Allow users to always view published content (especially useful with the revisioning module)." to the workflow access form which bypasses state based permission checks for viewing published nodes. That solves all the many many requests, bug reports, complaints whatsoever around here about using workflow with revisioning.

I'm not aware of any side effects, however, I'd be glad if someone could have a look at it so we don't open holes here.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tim-Erwin’s picture

Well, with hindsight I thought, maybe hook_node_access() is not the best pick, as it is not respected by views (correct?) etc. Attached you find a patch that does not look as clean, but solves the issue using the node_access table. It adds records with view permissions for anonymous and authenticated user if they don't yet have one.

Tim-Erwin’s picture

Ups, I forgot to limit the access to published nodes. Fixed it.

NancyDru’s picture

Given the limited audience could this be done as an add-on module?

johnv’s picture

This might be possible if Workflow were a 'true' Field API field, as proposed in #2019345: Create a 'Workflow Field' with Widget, Formatter, Fieldtype

johnv’s picture

Status: Needs review » Closed (duplicate)

Let's focus on #2019345.

johnv’s picture

Issue summary: View changes
Status: Closed (duplicate) » Fixed

This should be working now using Workflow Field, which contains support for Node revisions. Please re-open if there is a problem.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.