diff --git a/Helper/Security/Acl/AclHelper.php b/Helper/Security/Acl/AclHelper.php index 23b20cc8..e4cd91b5 100644 --- a/Helper/Security/Acl/AclHelper.php +++ b/Helper/Security/Acl/AclHelper.php @@ -180,9 +180,10 @@ private function getPermittedAclIdsSQLForUser(Query $query) OR {$aclConnection->getDatabasePlatform()->getIsNullExpression('e.object_identity_id')}) ) LEFT JOIN {$database}.acl_security_identities s ON ( -s.id = e.security_identity_id AND (s.identifier = {$inString}) +s.id = e.security_identity_id ) WHERE c.class_type = {$rootEntity} +AND (s.identifier = {$inString}) AND e.mask & {$mask} > 0 SELECTQUERY; diff --git a/Helper/Security/Acl/AclNativeHelper.php b/Helper/Security/Acl/AclNativeHelper.php index e8e7fb29..697c4b0f 100644 --- a/Helper/Security/Acl/AclNativeHelper.php +++ b/Helper/Security/Acl/AclNativeHelper.php @@ -112,9 +112,10 @@ public function apply(QueryBuilder $queryBuilder, PermissionDefinition $permissi OR {$aclConnection->getDatabasePlatform()->getIsNullExpression('e.object_identity_id')}) ) LEFT JOIN {$database}.acl_security_identities s ON ( -s.id = e.security_identity_id AND (s.identifier = {$inString}) +s.id = e.security_identity_id ) WHERE c.class_type = {$rootEntity} +AND (s.identifier = {$inString}) AND e.mask & {$mask} > 0 SELECTQUERY;