aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-03-16 17:10:50 +0000
committerzsloan2021-03-16 17:10:50 +0000
commit7004219e51a6053a03ec4a997d759c52ed36bdfe (patch)
treeeef71e89ac90c355c758341c69bd2752ec6d6f54
parente08ea78ef42243ab35bceb059033839b701ec6e7 (diff)
downloadgenenetwork2-7004219e51a6053a03ec4a997d759c52ed36bdfe.tar.gz
Removed unnecessary encoding of user_id from 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 786475a8..672b36d5 100644
--- a/wqflask/utility/authentication_tools.py
+++ b/wqflask/utility/authentication_tools.py
@@ -31,7 +31,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 +132,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)