From a1c1312037176364024a1d926e9fc76c7ee8c12f Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 18 Feb 2021 17:59:01 +0000 Subject: Need to account for permissions having either a list or string until I figure out what's going on with the proxy --- wqflask/wqflask/views.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 0c8335c9..2c0ba586 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -103,9 +103,12 @@ def check_access_permissions(): elif dataset.type != "Publish": permissions = check_resource_availability(dataset) - - if permissions['data'] == 'no-access': - return redirect(url_for("no_access_page")) + if type(permissions['data']) is list: + if 'view' not in permissions['data']: + return redirect(url_for("no_access_page")) + else: + if permissions['data'] == 'no-access': + return redirect(url_for("no_access_page")) @app.teardown_appcontext def shutdown_session(exception=None): -- cgit v1.2.3