'Missing permissions for nested grouping' =>
[ ['product:read'
],
(new Criteria()) ->
addGroupField(new FieldGrouping('categories.media.private'
)),
false,
],
// aggregation validation
'Has permissions for aggregation' =>
[ ['product:read', 'category:read'
],
(new Criteria()) ->
addAggregation(new CountAggregation('count-agg', 'categories.active'
)),
true,
],
'Missing permissions for aggregation' =>
[ ['product:read'
],
(new Criteria()) ->
addAggregation(new CountAggregation('count-agg', 'categories.active'
)),
false,
],
'Has permissions for nested aggregation' =>
[ ['product:read', 'category:read', 'media:read'
],
(new Criteria())