Skip to content

Commit

Permalink
merged branch aboks/acl_voter (PR symfony#1954)
Browse files Browse the repository at this point in the history
Commits
-------

09c41d3 [Security] Fixed incorrect merge of two modifications (53f5c23 and 8519967) to AclVoter

Discussion
----------

[Security] Fixed incorrect merge of two modifications to AclVoter

It seems two modifications to `AclVoter` (53f5c23 and 8519967) have been merged incorrectly, leading to a method call on an object that is known to be `null` and a fatal error when running the tests
  • Loading branch information
fabpot committed Aug 14, 2011
2 parents 283097d + 09c41d3 commit 5d4b8a7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Symfony/Component/Security/Acl/Voter/AclVoter.php
Expand Up @@ -82,14 +82,13 @@ public function vote(TokenInterface $token, $object, array $attributes)
$this->logger->debug(sprintf('Object identity unavailable. Voting to %s', $this->allowIfObjectIdentityUnavailable? 'grant access' : 'abstain'));
}

if (!$this->supportsClass($oid->getType())) {
return self::ACCESS_ABSTAIN;
}

$sids = $this->securityIdentityRetrievalStrategy->getSecurityIdentities($token);

return $this->allowIfObjectIdentityUnavailable ? self::ACCESS_GRANTED : self::ACCESS_ABSTAIN;
}

if (!$this->supportsClass($oid->getType())) {
return self::ACCESS_ABSTAIN;
}

$sids = $this->securityIdentityRetrievalStrategy->getSecurityIdentities($token);

try {
Expand Down

0 comments on commit 5d4b8a7

Please sign in to comment.