Skip to content
Snippets Groups Projects
Commit 119f3499 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

attribute expressions: don't mix read/write access attributes

From what I see this is a bug and the read attributes are not required by default to
also have an expression configured for write access.

This fixes a bug where trying to write to any attribute would fail.
parent c47bdb7b
No related branches found
No related tags found
No related merge requests found
Pipeline #232446 passed
...@@ -225,6 +225,7 @@ abstract class AbstractAuthorizationService implements ContextAwareNormalizerInt ...@@ -225,6 +225,7 @@ abstract class AbstractAuthorizationService implements ContextAwareNormalizerInt
self::ENTITY_ATTRIBUTE_NAMES_KEY => $attributeNames, self::ENTITY_ATTRIBUTE_NAMES_KEY => $attributeNames,
]; ];
$attributeNames = [];
foreach ($entityNode[AuthorizationConfigDefinition::ENTITY_WRITE_ACCESS_CONFIG_NODE] ?? [] as $attributeName => $attributeAuthorizationExpression) { foreach ($entityNode[AuthorizationConfigDefinition::ENTITY_WRITE_ACCESS_CONFIG_NODE] ?? [] as $attributeName => $attributeAuthorizationExpression) {
$roleExpressions[self::toWriteAttributeId($entityShortName, $attributeName)] = $attributeAuthorizationExpression; $roleExpressions[self::toWriteAttributeId($entityShortName, $attributeName)] = $attributeAuthorizationExpression;
$attributeNames[] = $attributeName; $attributeNames[] = $attributeName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment