mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
* quick fix ignoring fields wrapped in $FOLLOW when checking permissions * checking related permissions for $FOLLOW filter * moved $FOLLOW logic to extractRequiredFieldPermissions * initial attempt at making e2e test for this issue * moved test to many-to-many.test.ts * added permissions for the test * created new user and role for these tests * broadened the expected matching object * only expecting name as the id field UUID was giving inconsistent uppercased results with mssql
38 lines
787 B
JavaScript
38 lines
787 B
JavaScript
exports.seed = async function (knex) {
|
|
await knex('directus_permissions').del();
|
|
|
|
return await knex('directus_permissions').insert([
|
|
// TestUser role permissions
|
|
{
|
|
role: '214faee7-d6a6-4a4c-b1cd-f9e9bd0b6fb7',
|
|
collection: 'guests',
|
|
action: 'read',
|
|
fields: '*',
|
|
},
|
|
{
|
|
role: '214faee7-d6a6-4a4c-b1cd-f9e9bd0b6fb7',
|
|
collection: 'directus_roles',
|
|
action: 'read',
|
|
fields: '*',
|
|
},
|
|
{
|
|
role: '67ce831d-7a02-4a06-a8c9-c8ea16d71e91',
|
|
collection: 'artists',
|
|
action: 'read',
|
|
fields: 'id,name',
|
|
},
|
|
{
|
|
role: '67ce831d-7a02-4a06-a8c9-c8ea16d71e91',
|
|
collection: 'artists_events',
|
|
action: 'read',
|
|
fields: '*',
|
|
},
|
|
{
|
|
role: '67ce831d-7a02-4a06-a8c9-c8ea16d71e91',
|
|
collection: 'events',
|
|
action: 'read',
|
|
fields: '*',
|
|
},
|
|
]);
|
|
};
|