Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions #1

Open
rvanoord opened this issue May 2, 2022 · 2 comments
Open

Suggestions #1

rvanoord opened this issue May 2, 2022 · 2 comments

Comments

@rvanoord
Copy link

rvanoord commented May 2, 2022

This looks great @u12206050!

Here are a few suggestions for further improvement:

  1. Support full sync (including deletions) for roles -- obviously with an exception for the public and administrator roles.
  2. Add support for fields and collections (basically the same functionality as snapshots -- but automatically exported and applied).
  3. Perhaps the import/export code can be generalized to work on any sort of collection, and the collections to include is simply a config?
  4. Given the above points - the extension could be renamed to directus-file-based-config which reflects the intention
  5. Suggest replacing "BOTH" with "FULL" for the "sync" config
  6. Is there a way of triggering a full export (i.e. instead of waiting for the next change)?
@u12206050
Copy link
Owner

@rvanoord

Good suggestions, some are already done.

  • Trigger full export. Both rbac export and rbac import exist as cli commands.
  • Suggest replacing "BOTH" with "FULL" for the "sync" config.
  • Trigger full export when roles are deleted.

Regarding the other two.

To keep things simple, small and tidy, I would implement support for other fields and collections as a separate library.

Personally I feel the schema export creates too big of a file, generating a lot more git conflicts when multiple developers are involved. I think an option to separate the schema file into smaller files, maybe one per collection, might even have all the collection's permissions also in there, so you end up with a nice file describing the entire collection and its' permissions.

@rvanoord
Copy link
Author

rvanoord commented May 3, 2022

I would probably still suggest having roles, permissions, fields and collections in the same library - but make it optional which things to import/export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants