From dc48b708fae915aa8484810f7814d0b66e6a87e1 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 18 Feb 2021 17:28:55 +0000 Subject: Fixed views.py to read properly formatted access masks correctly --- wqflask/wqflask/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index e4834d53..0c8335c9 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -84,7 +84,6 @@ def connect_db(): logger.info("@app.before_request connect_db") db = getattr(g, '_database', None) if db is None: - logger.debug("Get new database connector") g.db = g._database = sqlalchemy.create_engine(SQL_URI, encoding="latin1") logger.debug(g.db) @@ -104,7 +103,8 @@ def check_access_permissions(): elif dataset.type != "Publish": permissions = check_resource_availability(dataset) - if 'view' not in permissions['data']: + + if permissions['data'] == 'no-access': return redirect(url_for("no_access_page")) @app.teardown_appcontext -- cgit v1.2.3