handle case when HasScopeInterface has a null scope

This commit is contained in:
Julien Fastré 2015-07-03 22:34:04 +02:00
parent 135691f0fc
commit ab52528f71

View File

@ -106,6 +106,9 @@ class AuthorizationHelper
// perform check on scope if necessary
if ($entity instanceof HasScopeInterface) {
$scope = $entity->getScope();
if ($scope === NULL) {
return true;
}
if ($scope->getId() === $roleScope
->getScope()->getId()) {
return true;