Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: add cli command to fetch group sync settings as json #14694

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

Merged
merged 9 commits into from
Sep 17, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Sep 16, 2024

CLI commands to read and update role + group sync runtime settings. All settings are in json and take in input via stdin. Currently the cli is intentionally a bit obtuse in it's UX.

This is an MVP for setting the runtime values. The CLI and UI experience will be improved after GA.

Groupsync

$ coder organization  settings show groupsync --org=rabbit                                                                                               
{
        "field": "",
        "mapping": null,
        "regex_filter": null,
        "auto_create_missing_groups": false
}

And setting

$ coder organization  settings set groupsync --org=rabbit < input.json

Rolesync

$ coder organization  settings show rolesync --org=rabbit
{
        "field": "",
        "mapping": null
}

And setting

$ coder organization  settings set rolesync --org=rabbit < input.json

Improved error message:

Probably should have thrown this in another PR. In testing, I improved the error message for my own convenience.

error: Must select an organization with --org=<org_name>. Choose from "coder", "rabbit"

Closes #14687

@Emyrk Emyrk force-pushed the stevenmasley/group_sync_cli branch from aa16f9b to 87b9c45 Compare September 17, 2024 15:47
@Emyrk Emyrk requested a review from f0ssel September 17, 2024 17:08
@Emyrk Emyrk requested a review from f0ssel September 17, 2024 18:11
@Emyrk Emyrk merged commit d96adad into main Sep 17, 2024
27 checks passed
@Emyrk Emyrk deleted the stevenmasley/group_sync_cli branch September 17, 2024 19:08
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Group and Role Sync CLI
2 participants