Closed NilsBaumgartner1994 closed 4 months ago
Sure there is. Have you inspected the configuration carefully?
It's part of the default configuration in directus_config.js
:
export const syncDirectusCollections = {
directus_roles: {
watch: ["roles"],
},
directus_permissions: {
watch: ["permissions", "collections", "fields"],
excludeFields: ["id"],
getKey: (o) => `${o.role ?? "public"}-${o.collection}--${o.action}`,
query: {
sort: ["role", "collection", "action"],
},
},
}
Correct.
as a side-note:
The getKey
is more of a suggestion than a must have, ie. if you need the same role id across environments, and you also sync a few admin users for example then you would want the role id to be synced as well so you would then remove the getKey
@u12206050 Glad that you've answered me on this one, would've fall into that pitfall in the future. Since I only init with admin users I guess it wasn't a problem.
Describe the Improvement
Is it possible to sync the roles? As I found there is a way to synchronize permissons.