Skip to content

Commit

Permalink
Merge pull request #1507 from Glideh/patch-1
Browse files Browse the repository at this point in the history
RoleSecurityHandler - Passing the current object to voters
  • Loading branch information
rande committed Aug 7, 2013
2 parents 9917d71 + d9f9f24 commit d5eb607
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Security/Handler/RoleSecurityHandler.php
Expand Up @@ -45,7 +45,8 @@ public function isGranted(AdminInterface $admin, $attributes, $object = null)
}

try {
return $this->securityContext->isGranted($this->superAdminRoles) || $this->securityContext->isGranted($attributes);
return $this->securityContext->isGranted($this->superAdminRoles)
|| $this->securityContext->isGranted($attributes, $object);
} catch (AuthenticationCredentialsNotFoundException $e) {
return false;
} catch (\Exception $e) {
Expand Down

0 comments on commit d5eb607

Please sign in to comment.