Take into account 'destUserByAccessKey' in the list of workflows associated to a user

Refactor the query to include checks for user membership via both 'destUser' and 'destUserByAccessKey'. This ensures that workflows correctly account for user access by multiple criteria.
This commit is contained in:
Julien Fastré 2024-09-05 17:38:18 +02:00
parent 8c4f342ca1
commit e29e1db6ed
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -230,7 +230,10 @@ class EntityWorkflowRepository implements ObjectRepository
$qb->where(
$qb->expr()->andX(
$qb->expr()->isMemberOf(':user', 'step.destUser'),
$qb->expr()->orX(
$qb->expr()->isMemberOf(':user', 'step.destUser'),
$qb->expr()->isMemberOf(':user', 'step.destUserByAccessKey'),
),
$qb->expr()->isNull('step.transitionAfter'),
$qb->expr()->eq('step.isFinal', "'FALSE'")
)