aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/decorators.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wqflask/wqflask/decorators.py b/wqflask/wqflask/decorators.py
index 13867cda..edbea90f 100644
--- a/wqflask/wqflask/decorators.py
+++ b/wqflask/wqflask/decorators.py
@@ -5,6 +5,7 @@ import redis
from flask import current_app, g
from typing import Dict
+from urllib.parse import urljoin
from functools import wraps
from wqflask.access_roles import DataRole
@@ -56,8 +57,10 @@ def edit_access_required(f):
_user_id = g.user_session.record.get(b"user_id",
"").decode("utf-8")
response = json.loads(
- requests.get(GN_PROXY_URL + "available?resource="
- f"{resource_id}&user={_user_id}").content)
+ requests.get(urljoin(
+ current_app.config.get("GN2_PROXY"),
+ ("available?resource="
+ f"{resource_id}&user={_user_id}"))).content)
except:
response = {}
if max([DataRole(role) for role in response.get(