From ea7294f7d5b1ca9baf798a5457a97a2d04598a43 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 16 Dec 2019 15:30:18 +0100 Subject: [PATCH] do not add (user) flows twice Signed-off-by: Arthur Schiwon --- apps/workflowengine/lib/Service/RuleMatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index b08bcbbe56..6186df1d7b 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -124,7 +124,7 @@ class RuleMatcher implements IRuleMatcher { $additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class); foreach ($additionalScopes as $hash => $scopeCandidate) { /** @var ScopeContext $scopeCandidate */ - if ($scopeCandidate->getScope() !== IManager::SCOPE_USER) { + if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) { continue; } if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) {