mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Consider root ast a collection
This commit is contained in:
@@ -78,12 +78,10 @@ export class AuthorizationService {
|
||||
): { collection: string; field: string }[] {
|
||||
const collections = [];
|
||||
|
||||
if (ast.type !== 'root') {
|
||||
collections.push({
|
||||
collection: ast.name,
|
||||
field: ast.fieldKey || null,
|
||||
});
|
||||
}
|
||||
collections.push({
|
||||
collection: ast.name,
|
||||
field: ast.type === 'root' ? null : ast.fieldKey,
|
||||
});
|
||||
|
||||
for (const nestedNode of ast.children) {
|
||||
if (nestedNode.type !== 'field') {
|
||||
|
||||
Reference in New Issue
Block a user