-
Notifications
You must be signed in to change notification settings - Fork 20
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
[feat] Migrating users from config file to database #261
base: master
Are you sure you want to change the base?
Conversation
This pull request introduces 3 alerts when merging f13005e into bcbfdd0 - view on LGTM.com new alerts:
|
This doesn't work yet with the REST service because for some reason the database object is used in a thread that it wasn't initialized in. |
This pull request introduces 2 alerts when merging 0235596 into bcbfdd0 - view on LGTM.com new alerts:
|
Such issues should hopefully go away with the new COBalD version. Everything using |
I've already fixed the issue. I'm just not sure if my solution has a relevant performance overhead. |
Reconnecting to an SQLite DB for every execute should be fast enough. Also, your design encapsulates the DB enough so that refactoring it to cache a per-thread connection in the future would be possible. 👍 |
Added the UserDB.execute() method to prevent multithreading issues. Also some minor refactoring
@@ -0,0 +1,88 @@ | |||
from importlib.resources import path |
Check notice
Code scanning / CodeQL
Unused import
@@ -1,4 +1,5 @@ | |||
from .app.security import DatabaseUser | |||
from .app.security import DatabaseUser, LoginUser |
Check notice
Code scanning / CodeQL
Unused import
A CLI was added to make management of users possible/easier. Currently, it's not possible to manage users through the REST API as this poses a security risk.
This PR is simply a migration from the config file, and additions to the public REST API interface are not planned.
All previous commits but the last three can be ignored as they are part of another ongoing PR #250.
This should be kept as a Draft Request and repulled when #250 gets merged to avoid untidy commit history