aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/authentication_tools.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-06-16 10:53:08 +0300
committerFrederick Muriuki Muriithi2023-06-20 13:36:50 +0300
commit883a7cba581f34eba48978746e2ff8bbb93020d8 (patch)
tree433c1b0b6db451b841810b2fdb4f2fd07bc9377b /wqflask/utility/authentication_tools.py
parent7127095f2b2c54175d1360c1ddb3e0f87b6ede98 (diff)
downloadgenenetwork2-883a7cba581f34eba48978746e2ff8bbb93020d8.tar.gz
Add `create_app()` application factory
Create the application and set up configs and other things within an application factory function. Fix obvious egregious errors preventing the application from starting up correctly.
Diffstat (limited to 'wqflask/utility/authentication_tools.py')
-rw-r--r--wqflask/utility/authentication_tools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py
index 3d732228..0f48d26f 100644
--- a/wqflask/utility/authentication_tools.py
+++ b/wqflask/utility/authentication_tools.py
@@ -37,7 +37,7 @@ def check_resource_availability(dataset, user_id, trait_id=None):
return webqtlConfig.SUPER_PRIVILEGES
response = None
- the_url = f"{get_setting('GN_PROXY_URL')}available?resource={resource_id}&user={user_id}"
+ the_url = f"{get_setting(app, 'GN_PROXY_URL')}available?resource={resource_id}&user={user_id}"
try:
response = json.loads(requests.get(the_url).content)
except:
@@ -94,7 +94,7 @@ def get_group_code(dataset):
def check_admin(resource_id=None):
the_url = (
- f"{get_setting('GN_PROXY_URL')}available?resource={resource_id}"
+ f"{get_setting(app, 'GN_PROXY_URL')}available?resource={resource_id}"
f"&user={g.user_session.user_id}")
try:
response = json.loads(requests.get(the_url).content)['admin']