diff options
author | BonfaceKilz | 2021-10-28 12:52:22 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-11-04 15:22:41 +0300 |
commit | 482c19955b5b757ad6b79102c832678ae7339d20 (patch) | |
tree | 4fdd196f9a78e05900495283101eb26f35f466c6 | |
parent | 77845700752ff3283f40f0293e3b6d90c0b86d0c (diff) | |
download | genenetwork2-482c19955b5b757ad6b79102c832678ae7339d20.tar.gz |
Delete "check_access_permissions"
This check happens before every single request! Remove this.
-rw-r--r-- | wqflask/wqflask/views.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index f65dd143..3a84141d 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -115,29 +115,6 @@ def connect_db(): SQL_URI, encoding="latin1") -@app.before_request -def check_access_permissions(): - if 'dataset' in request.args: - permissions = DEFAULT_PRIVILEGES - if request.args['dataset'] != "Temp": - dataset = create_dataset(request.args['dataset']) - - if dataset.type == "Temp": - permissions = DEFAULT_PRIVILEGES - elif 'trait_id' in request.args: - permissions = check_resource_availability( - dataset, request.args['trait_id']) - elif dataset.type != "Publish": - permissions = check_resource_availability(dataset) - - 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): db = getattr(g, '_database', None) |