Flows that are managing themselves do not necessarily set the entity
for instance files_automatedtagging, which works on a lower level. Fixes a Call to a member function isLegitimatedForUserId() on null. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
34c48aaa92
commit
0a00903261
|
@ -121,14 +121,16 @@ class RuleMatcher implements IRuleMatcher {
|
||||||
$operations = array_merge($operations, $this->manager->getOperations($class, $scope));
|
$operations = array_merge($operations, $this->manager->getOperations($class, $scope));
|
||||||
}
|
}
|
||||||
|
|
||||||
$additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class);
|
if($this->entity instanceof IEntity) {
|
||||||
foreach ($additionalScopes as $hash => $scopeCandidate) {
|
$additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class);
|
||||||
/** @var ScopeContext $scopeCandidate */
|
foreach ($additionalScopes as $hash => $scopeCandidate) {
|
||||||
if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) {
|
/** @var ScopeContext $scopeCandidate */
|
||||||
continue;
|
if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) {
|
||||||
}
|
continue;
|
||||||
if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) {
|
}
|
||||||
$operations = array_merge($operations, $this->manager->getOperations($class, $scopeCandidate));
|
if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) {
|
||||||
|
$operations = array_merge($operations, $this->manager->getOperations($class, $scopeCandidate));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue