mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Follow up user Roles not loading (#16278)
* applied the same role fix too users invite * added same fix when saving permissions * Prevent loading users unecessarily on the permission page * Added proper `deep` query typing * fixed typing for tests * apply similar fix for navigation folder
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Query } from '@directus/shared/types';
|
||||
import { NestedDeepQuery } from '@directus/shared/types';
|
||||
import knex, { Knex } from 'knex';
|
||||
import { getTracker, MockClient, Tracker } from 'knex-mock-client';
|
||||
import { cloneDeep } from 'lodash';
|
||||
@@ -442,7 +442,7 @@ describe('Integration Tests', () => {
|
||||
});
|
||||
const response = await itemsService.readOne(rawItems[0].id, {
|
||||
fields: ['id', 'items.*'],
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as Query },
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as NestedDeepQuery },
|
||||
});
|
||||
|
||||
expect(tracker.history.select.length).toBe(2);
|
||||
@@ -532,7 +532,7 @@ describe('Integration Tests', () => {
|
||||
});
|
||||
const response = await itemsService.readOne(rawItems[0].id, {
|
||||
fields: ['id', 'items.*'],
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as Query },
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as NestedDeepQuery },
|
||||
});
|
||||
|
||||
expect(tracker.history.select.length).toBe(2);
|
||||
@@ -625,7 +625,7 @@ describe('Integration Tests', () => {
|
||||
expect(() =>
|
||||
itemsService.readOne(rawItems[0].id, {
|
||||
fields: ['id', 'items.*'],
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as Query },
|
||||
deep: { items: { _filter: { title: { _eq: childItems[0].title } } } as NestedDeepQuery },
|
||||
})
|
||||
).rejects.toThrow("You don't have permission to access this.");
|
||||
expect(tracker.history.select.length).toBe(0);
|
||||
|
||||
Reference in New Issue
Block a user