Do not allow editing read-only properties (#17915)

This commit is contained in:
Kenn Jacobsen
2025-01-09 06:59:32 +01:00
committed by GitHub
parent cce056b7de
commit 0565eeebd5
3 changed files with 107 additions and 1 deletions

View File

@@ -458,7 +458,8 @@ internal abstract class ContentEditingServiceBase<TContent, TContentType, TConte
IDataValueEditor dataValueEditor = dataEditor.GetValueEditor();
if (dataValueEditor.IsReadOnly)
{
return null;
// read-only property editor - get and return the current value
return content.GetValue(propertyType.Alias, culture, segment);
}
IDataType? dataType = await _dataTypeService.GetAsync(propertyType.DataTypeKey);