Hi,

I think I found a bug in includes/Entity/WorkflowState.php

In the function responsible for getting available Transitions for the given user, the variable $entity_id is used in a comparison to check if the entity in question is _new_.
However, this variable is not defined in the current scope, there resulting in assigning _any_ user the WORKFLOW_ROLE_AUTHOR_RID role.

The attached patch fixes this issue by extracting the entity_id upfront.

CommentFileSizeAuthor
#1 workflow-entity_id_check-2331969.patch650 bytesLCM

Comments

LCM’s picture

StatusFileSize
new650 bytes
johnv’s picture

Version: 7.x-2.x-dev » 7.x-2.4
Status: Active » Fixed

Thanks Lennart, this is now committed.

  • johnv committed 4fa0cb9 on 7.x-2.x
    Issue #2331969 by LCM: Fixed available transitions for non-author in...
johnv’s picture

Title: Fix for WorkflowState::getTransitions() missing $entity_id var » Incorrect available transitions for non-author in WorkflowState::getTransitions()

Changed title to a more functional, less technical version.

Status: Fixed » Closed (fixed)

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