aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-06 10:14:02 -0500
committerFrederick Muriuki Muriithi2024-06-06 10:17:32 -0500
commitc1af1940cca1ae54d424632e8c5f06b55cae071a (patch)
treeb162fc8afae1ba2434c33bb59ab07855555471f2 /gn2/wqflask
parent7d0c5cf8d2ab49f6a98c0a15189da5b7fa1695fd (diff)
downloadgenenetwork2-c1af1940cca1ae54d424632e8c5f06b55cae071a.tar.gz
Remove the "Roles" page.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r--gn2/wqflask/oauth2/roles.py25
-rw-r--r--gn2/wqflask/templates/oauth2/profile_nav.html7
2 files changed, 0 insertions, 32 deletions
diff --git a/gn2/wqflask/oauth2/roles.py b/gn2/wqflask/oauth2/roles.py
index ee75475e..b0f990c7 100644
--- a/gn2/wqflask/oauth2/roles.py
+++ b/gn2/wqflask/oauth2/roles.py
@@ -10,31 +10,6 @@ from .request_utils import request_error, process_error
roles = Blueprint("role", __name__)
-@roles.route("/user", methods=["GET"])
-@require_oauth2
-def user_roles():
- def __grerror__(roles, user_privileges, error):
- return render_ui(
- "oauth2/list_roles.html", roles=roles,
- user_privileges=user_privileges,
- group_roles_error=process_error(error))
-
- def __grsuccess__(roles, user_privileges, group_roles):
- return render_ui(
- "oauth2/list_roles.html", roles=roles,
- user_privileges=user_privileges, group_roles=group_roles)
-
- def __role_success__(roles):
- uprivs = tuple(
- privilege["privilege_id"] for role in roles
- for privilege in role["privileges"])
- return oauth2_get("auth/group/roles").either(
- lambda err: __grerror__(roles, uprivs, err),
- lambda groles: __grsuccess__(roles, uprivs, groles))
-
- return oauth2_get("auth/system/roles").either(
- request_error, __role_success__)
-
@roles.route("/role/<uuid:role_id>", methods=["GET"])
@require_oauth2
def role(role_id: uuid.UUID):
diff --git a/gn2/wqflask/templates/oauth2/profile_nav.html b/gn2/wqflask/templates/oauth2/profile_nav.html
index aa752905..c79bccbc 100644
--- a/gn2/wqflask/templates/oauth2/profile_nav.html
+++ b/gn2/wqflask/templates/oauth2/profile_nav.html
@@ -17,13 +17,6 @@
</li>
<li role="presentation"
- {%if calling_page == "roles"%}
- class="active"
- {%endif%}>
- <a href="{{url_for('oauth2.role.user_roles')}}">Roles</a>
- </li>
-
- <li role="presentation"
{%if calling_page == "resources"%}
class="active"
{%endif%}>