do not add (user) flows twice

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/18430/head
Arthur Schiwon 6 years ago
parent 3b8fbf129e
commit ea7294f7d5
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
  1. 2
      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())) {

Loading…
Cancel
Save