This commit is contained in:
@@ -30,14 +30,15 @@ namespace AyaNova.Biz
|
|||||||
ProtectedProperties = protectedProperties.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
ProtectedProperties = protectedProperties.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string Property in ProtectedProperties)
|
if (ProtectedProperties != null)
|
||||||
{
|
foreach (string Property in ProtectedProperties)
|
||||||
if (objectPatch.Operations.Any(m => m.path == $"/{Property.ToLowerInvariant()}"))
|
|
||||||
{
|
{
|
||||||
biz.AddError(ValidationErrorType.NotChangeable, Property);
|
if (objectPatch.Operations.Any(m => m.path == $"/{Property.ToLowerInvariant()}"))
|
||||||
IsValid = false;
|
{
|
||||||
|
biz.AddError(ValidationErrorType.NotChangeable, Property);
|
||||||
|
IsValid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//check for in-valid patches
|
//check for in-valid patches
|
||||||
if (objectPatch.Operations.Any(m => m.path == "/id"))
|
if (objectPatch.Operations.Any(m => m.path == "/id"))
|
||||||
|
|||||||
Reference in New Issue
Block a user