diff options
author | cbdev <cb@cbcdn.com> | 2022-07-04 19:21:34 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2022-07-04 19:21:34 +0200 |
commit | 507f0d060da30a8f65bec8b2ac1f08837d536b4c (patch) | |
tree | b2c5a1f9cc5080fb7f2586e2371fce443e43fbaa /backend/Admin.py | |
parent | 4369d6a7f024f9ebf3c5f41a8fe17bfc65d0a820 (diff) | |
download | cargohold-507f0d060da30a8f65bec8b2ac1f08837d536b4c.tar.gz cargohold-507f0d060da30a8f65bec8b2ac1f08837d536b4c.tar.bz2 cargohold-507f0d060da30a8f65bec8b2ac1f08837d536b4c.zip |
Implement authentication modules for admin panel
Diffstat (limited to 'backend/Admin.py')
-rw-r--r-- | backend/Admin.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/Admin.py b/backend/Admin.py new file mode 100644 index 0000000..b88f4c7 --- /dev/null +++ b/backend/Admin.py @@ -0,0 +1,9 @@ +import config +from utils import redirect + +def route(path, env, post): + user = config.Auth.get(env) + if not user: + return redirect("/") + # TBD + return ["Admin panel for " + user["user"], [('Content-Type','text/html')], "200 OK"] |