Merge pull request #18430 from nextcloud/fix/noid/double-flow

Fix/noid/double flow
This commit is contained in:
Roeland Jago Douma 2019-12-16 20:29:53 +01:00 committed by GitHub
commit 2df9073025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ class Application extends \OCP\AppFramework\App {
$operation->onEventCompat($eventName, $event, $ruleMatcher); $operation->onEventCompat($eventName, $event, $ruleMatcher);
} else { } else {
$logger = $this->getContainer()->getServer()->getLogger(); $logger = $this->getContainer()->getServer()->getLogger();
$logger->warning( $logger->debug(
'Cannot handle event {name} of {event} against entity {entity} and operation {operation}', 'Cannot handle event {name} of {event} against entity {entity} and operation {operation}',
[ [
'app' => self::APP_ID, 'app' => self::APP_ID,

View File

@ -124,7 +124,7 @@ class RuleMatcher implements IRuleMatcher {
$additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class); $additionalScopes = $this->manager->getAllConfiguredScopesForOperation($class);
foreach ($additionalScopes as $hash => $scopeCandidate) { foreach ($additionalScopes as $hash => $scopeCandidate) {
/** @var ScopeContext $scopeCandidate */ /** @var ScopeContext $scopeCandidate */
if ($scopeCandidate->getScope() !== IManager::SCOPE_USER) { if ($scopeCandidate->getScope() !== IManager::SCOPE_USER || in_array($scopeCandidate, $scopes)) {
continue; continue;
} }
if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) { if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) {