diff options
author | Munyoki Kilyungi | 2024-03-26 18:15:48 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-03-27 17:59:06 +0300 |
commit | 20e334085b2a3ce8728d1ef5b8e6948133513c97 (patch) | |
tree | 024d8f32b36db5332d400e1e35524e4bc5d78286 /gn2 | |
parent | 46a97f0697bb03c5700825c93bc495374bb28e0a (diff) | |
download | genenetwork2-20e334085b2a3ce8728d1ef5b8e6948133513c97.tar.gz |
Require log-in to use the gn-qa search system.
* gn2/wqflask/views.py: Import require_oauth2.
(gnqna): Add "require_oauth2" decorator.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Co-authored-by: Alexander Kabui <alexanderkabua@gmail.com>
Diffstat (limited to 'gn2')
-rw-r--r-- | gn2/wqflask/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index 25c4ee1b..81d73433 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -100,6 +100,9 @@ from gn2.wqflask.oauth2.client import user_logged_in from gn2.wqflask import requests as monad_requests +from gn2.wqflask.oauth2.checks import require_oauth2 + + Redis = get_redis_conn() @@ -253,6 +256,7 @@ def gsearchtable(): @app.route("/gnqna", methods=["POST", "GET"]) +@require_oauth2 def gnqna(): if request.method == "POST": |