Update ContentValueSetValidator to allow include/exclude of fields (#14177)
This commit is contained in:
@@ -19,10 +19,28 @@ public class ContentValueSetValidator : ValueSetValidator, IContentValueSetValid
|
||||
|
||||
// used for tests
|
||||
public ContentValueSetValidator(bool publishedValuesOnly, int? parentId = null, IEnumerable<string>? includeItemTypes = null, IEnumerable<string>? excludeItemTypes = null)
|
||||
: this(publishedValuesOnly, true, null, null, parentId, includeItemTypes, excludeItemTypes)
|
||||
: this(publishedValuesOnly, true, null, null, parentId, includeItemTypes, excludeItemTypes, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
[Obsolete("Use the overload accepting includeFields and excludeFields instead. This overload will be removed in Umbraco 14.")]
|
||||
public ContentValueSetValidator(
|
||||
bool publishedValuesOnly,
|
||||
bool supportProtectedContent,
|
||||
IPublicAccessService? publicAccessService,
|
||||
IScopeProvider? scopeProvider,
|
||||
int? parentId,
|
||||
IEnumerable<string>? includeItemTypes,
|
||||
IEnumerable<string>? excludeItemTypes)
|
||||
: base(includeItemTypes, excludeItemTypes, null, null)
|
||||
{
|
||||
PublishedValuesOnly = publishedValuesOnly;
|
||||
SupportProtectedContent = supportProtectedContent;
|
||||
ParentId = parentId;
|
||||
_publicAccessService = publicAccessService;
|
||||
_scopeProvider = scopeProvider;
|
||||
}
|
||||
|
||||
public ContentValueSetValidator(
|
||||
bool publishedValuesOnly,
|
||||
bool supportProtectedContent,
|
||||
@@ -30,8 +48,10 @@ public class ContentValueSetValidator : ValueSetValidator, IContentValueSetValid
|
||||
IScopeProvider? scopeProvider,
|
||||
int? parentId = null,
|
||||
IEnumerable<string>? includeItemTypes = null,
|
||||
IEnumerable<string>? excludeItemTypes = null)
|
||||
: base(includeItemTypes, excludeItemTypes, null, null)
|
||||
IEnumerable<string>? excludeItemTypes = null,
|
||||
IEnumerable<string>? includeFields = null,
|
||||
IEnumerable<string>? excludeFields = null)
|
||||
: base(includeItemTypes, excludeItemTypes, includeFields, excludeFields)
|
||||
{
|
||||
PublishedValuesOnly = publishedValuesOnly;
|
||||
SupportProtectedContent = supportProtectedContent;
|
||||
|
||||
Reference in New Issue
Block a user