aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-05-29 11:21:48 +0300
committerFrederick Muriuki Muriithi2023-05-29 11:21:48 +0300
commit25c6da03e1639895f0051e8be6502762beefde0b (patch)
tree3355d9538c550753b6b5f45f37446c0f1e584011 /main.py
parenta448329fac4ca3c3c42dd180e3bc823024bbd25c (diff)
downloadgenenetwork3-25c6da03e1639895f0051e8be6502762beefde0b.tar.gz
Enable Administrator login on GN3
* gn3/auth/authentication/oauth2/views.py: Remove endpoint * gn3/auth/authorisation/users/admin/__init__.py: New admin module * gn3/auth/authorisation/users/admin/ui.py: New admin module * gn3/auth/authorisation/users/admin/views.py: New admin module * gn3/auth/views.py: Use new admin module * gn3/errors.py: Fix linting errors * gn3/templates/login.html: New html template * main.py: Fix linting errors
Diffstat (limited to 'main.py')
-rw-r--r--main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.py b/main.py
index b6b323c..9864240 100644
--- a/main.py
+++ b/main.py
@@ -15,6 +15,8 @@ from gn3.auth.authentication.users import hash_password
from gn3.auth import db
+from scripts import migrate_existing_data as med# type: ignore[import]
+
app = create_app()
##### BEGIN: CLI Commands #####
@@ -111,8 +113,7 @@ def assign_system_admin(user_id: uuid.UUID):
@app.cli.command()
def make_data_public():
"""Make existing data that is not assigned to any group publicly visible."""
- from scripts.migrate_existing_data import entry
- entry(app.config["AUTH_DB"], app.config["SQL_URI"])
+ med.entry(app.config["AUTH_DB"], app.config["SQL_URI"])
##### END: CLI Commands #####