aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/authentication_tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/authentication_tools.py')
-rw-r--r--wqflask/utility/authentication_tools.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py
index 786475a8..57dbf8ba 100644
--- a/wqflask/utility/authentication_tools.py
+++ b/wqflask/utility/authentication_tools.py
@@ -11,6 +11,7 @@ from utility.redis_tools import (get_redis_conn,
add_resource)
Redis = get_redis_conn()
+
def check_resource_availability(dataset, trait_id=None):
# At least for now assume temporary entered traits are accessible
if type(dataset) == str or dataset.type == "Temp":
@@ -31,7 +32,7 @@ def check_resource_availability(dataset, trait_id=None):
# ZS: Check if super-user - we should probably come up with some
# way to integrate this into the proxy
- if str.encode(g.user_session.user_id) in Redis.smembers("super_users"):
+ if g.user_session.user_id in Redis.smembers("super_users"):
return webqtlConfig.SUPER_PRIVILEGES
response = None
@@ -132,7 +133,7 @@ def check_owner_or_admin(dataset=None, trait_id=None, resource_id=None):
else:
resource_id = get_resource_id(dataset, trait_id)
- if str.encode(g.user_session.user_id) in Redis.smembers("super_users"):
+ if g.user_session.user_id in Redis.smembers("super_users"):
return "owner"
resource_info = get_resource_info(resource_id)