瀏覽代碼

[Security] Fixed incorrect merge of two modifications (53f5c23c and 85199677) to AclVoter

Arnout Boks 13 年之前
父節點
當前提交
09c41d32ca
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      src/Symfony/Component/Security/Acl/Voter/AclVoter.php

+ 5 - 6
src/Symfony/Component/Security/Acl/Voter/AclVoter.php

@@ -82,14 +82,13 @@ class AclVoter implements VoterInterface
                     $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 {