diff --git a/src/CoreExtensions/ClassDefinitions/DynamicPermissionResource.php b/src/CoreExtensions/ClassDefinitions/DynamicPermissionResource.php index 3280b8a..ff5ce1b 100644 --- a/src/CoreExtensions/ClassDefinitions/DynamicPermissionResource.php +++ b/src/CoreExtensions/ClassDefinitions/DynamicPermissionResource.php @@ -136,6 +136,13 @@ protected function cleanupAndCheckForEmpty($data) public function getDataForEditmode(mixed $data, DataObject\Concrete $object = null, array $params = []): mixed { + $permissions = $this->getPermissionResources(); + foreach ($permissions as $permission) { + if (!array_key_exists($permission['value'], $data)) { + $data[$permission['value']] = Service::INHERIT; + } + } + return $data; }