diff options
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |