aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-25 12:05:57 +0300
committerBonfaceKilz2021-10-25 14:00:14 +0300
commitbe0e73c1db12806580fa5c541eceec2a54c10ad3 (patch)
treeb2099ae9e38da91c510cb164b4769b20dde269de
parent935270b1cc1e265b785958cf5805bf155d8ae859 (diff)
downloadgenenetwork2-be0e73c1db12806580fa5c541eceec2a54c10ad3.tar.gz
Add "GET /resources/<resource_id>/change-owner" endpoint
-rw-r--r--wqflask/wqflask/resource_manager.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/wqflask/wqflask/resource_manager.py b/wqflask/wqflask/resource_manager.py
index 74941341..9487bab5 100644
--- a/wqflask/wqflask/resource_manager.py
+++ b/wqflask/wqflask/resource_manager.py
@@ -14,6 +14,7 @@ from urllib.parse import urljoin
from typing import Dict
from wqflask.decorators import edit_access_required
+from wqflask.decorators import edit_admins_access_required
from wqflask.decorators import login_required
from wqflask.access_roles import AdminRole
from wqflask.access_roles import DataRole
@@ -177,3 +178,12 @@ def update_resource_publicity(resource_id: str):
redis_conn.hset("resources", resource_id, json.dumps(resource_info))
return redirect(url_for("resource_management.view_resource",
resource_id=resource_id))
+
+
+@resource_management.route("/resources/<resource_id>/change-owner")
+@edit_admins_access_required
+@login_required
+def view_resource_owner(resource_id: str):
+ return render_template(
+ "admin/change_resource_owner.html",
+ resource_id=resource_id)