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

Fixes #1304 Ability to add/edit deployment ids though the django admin panel #1318

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonespm
Copy link
Member

@jonespm jonespm commented Sep 16, 2021

This draft is working so far, but currently it's either/or. You define a config in the config file or in the admin panel.

This presents somewhat of a chicken/egg problem. Since you'd need to have the entry in the database or have a local admin account to login to add the initial configuration. I'm not sure the best way to handle this yet.

We could either

  1. Try to combine the ToolConfDict and DjangoDbToolConf so you have to define something in the config file first which would allow an initial launch. But this initial launch wouldn't be editable.
  2. Have some type of management command to load an initial json into the database? Maybe extend or be based on the current createkeys command to instead create keys and create a tool on the CLI? It could still generate the keys, saving a step?
  3. Require other schools to leave the "ENABLE_BACKEND_LOGIN": true at least initially so it can be configured then maybe turn it off?

I'm somewhat leaning against solution 1, because you can't modify the config JSON that's kind of a negative. Unless the software inserted that initial value into the database? Perhaps as a 4th idea similar to 1

  1. If there is no data in the database but there is configuration data in the config file, populate the Db with the ToolConfDict data. (This would still require keys generated though so not super ideal)

  2. Provide configurable SQL queries to populate the initial data in the database.

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

Successfully merging this pull request may close these issues.

Ability To add/edit deployment ids through the django admin panel.
1 participant