Skip to content

Commit 98010f7

Browse files
committed
Updated config and dependencies for Directus 11
1 parent 07847b1 commit 98010f7

File tree

4 files changed

+6512
-4917
lines changed

4 files changed

+6512
-4917
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ You can create **additional config files** with the other config files, and set
8787

8888
View the comments in the `config.js` file for more information.
8989

90-
**Exporting user passwords** does not work out of the box due to Directus masking the exported password. In order to export the hashed value you can add the following to your config for `directus_users`
90+
### Exporting users with passwords
91+
This does not work out of the box due to Directus masking the exported password. In order to export the hashed value you can add the following to your config for `directus_users`
9192

9293
```js
9394
onExport: async (item, itemsSrv) => {

install/schema-sync/directus_config.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
* Add custom collections to the syncCustomCollections object in the config.js file.
1111
*/
1212
export const syncDirectusCollections = {
13-
directus_roles: {
14-
watch: ['roles'],
15-
},
1613
directus_folders: {
1714
watch: ['folders'],
1815
excludeFields: [],
@@ -21,6 +18,35 @@ export const syncDirectusCollections = {
2118
sort: ['parent', 'id'],
2219
},
2320
},
21+
directus_roles: {
22+
watch: ['roles'],
23+
linkedFields: ['parent'],
24+
query: {
25+
sort: ['name'],
26+
},
27+
},
28+
directus_policies: {
29+
watch: ['policies'],
30+
query: {
31+
sort: ['name'],
32+
},
33+
},
34+
directus_permissions: {
35+
watch: ['permissions', 'collections', 'fields'],
36+
excludeFields: ['id'],
37+
getKey: o => `${o.policy}-${o.collection}-${o.action}`,
38+
query: {
39+
sort: ['policy', 'collection', 'action'],
40+
},
41+
},
42+
directus_access: {
43+
watch: ['access'],
44+
excludeFields: ['id'],
45+
getKey: o => `${o.role ?? o.user ?? 'public'}-${o.policy}`,
46+
query: {
47+
sort: ['policy'],
48+
},
49+
},
2450
directus_permissions: {
2551
watch: ['permissions', 'collections', 'fields'],
2652
excludeFields: ['id'],

0 commit comments

Comments
 (0)