From 204a308be0f741726b9a620d88fbc22b22124c81 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 29 Dec 2023 18:55:37 +0000 Subject: Namespace all modules under gn2. We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service. --- gn2/wqflask/templates/oauth2/create-resource.html | 89 ++++++ gn2/wqflask/templates/oauth2/create-role.html | 46 +++ .../templates/oauth2/data-list-genotype.html | 166 ++++++++++ gn2/wqflask/templates/oauth2/data-list-mrna.html | 168 ++++++++++ .../templates/oauth2/data-list-phenotype.html | 209 ++++++++++++ gn2/wqflask/templates/oauth2/data-list.html | 53 ++++ gn2/wqflask/templates/oauth2/display_error.html | 10 + gn2/wqflask/templates/oauth2/group.html | 114 +++++++ .../templates/oauth2/group_join_or_create.html | 99 ++++++ gn2/wqflask/templates/oauth2/join-requests.html | 73 +++++ gn2/wqflask/templates/oauth2/list_roles.html | 80 +++++ gn2/wqflask/templates/oauth2/login.html | 47 +++ gn2/wqflask/templates/oauth2/masquerade.html | 39 +++ gn2/wqflask/templates/oauth2/profile_nav.html | 64 ++++ gn2/wqflask/templates/oauth2/register_user.html | 62 ++++ gn2/wqflask/templates/oauth2/request_error.html | 32 ++ gn2/wqflask/templates/oauth2/resources.html | 58 ++++ gn2/wqflask/templates/oauth2/role.html | 56 ++++ gn2/wqflask/templates/oauth2/view-group-role.html | 102 ++++++ gn2/wqflask/templates/oauth2/view-resource.html | 352 +++++++++++++++++++++ gn2/wqflask/templates/oauth2/view-user.html | 48 +++ 21 files changed, 1967 insertions(+) create mode 100644 gn2/wqflask/templates/oauth2/create-resource.html create mode 100644 gn2/wqflask/templates/oauth2/create-role.html create mode 100644 gn2/wqflask/templates/oauth2/data-list-genotype.html create mode 100644 gn2/wqflask/templates/oauth2/data-list-mrna.html create mode 100644 gn2/wqflask/templates/oauth2/data-list-phenotype.html create mode 100644 gn2/wqflask/templates/oauth2/data-list.html create mode 100644 gn2/wqflask/templates/oauth2/display_error.html create mode 100644 gn2/wqflask/templates/oauth2/group.html create mode 100644 gn2/wqflask/templates/oauth2/group_join_or_create.html create mode 100644 gn2/wqflask/templates/oauth2/join-requests.html create mode 100644 gn2/wqflask/templates/oauth2/list_roles.html create mode 100644 gn2/wqflask/templates/oauth2/login.html create mode 100644 gn2/wqflask/templates/oauth2/masquerade.html create mode 100644 gn2/wqflask/templates/oauth2/profile_nav.html create mode 100644 gn2/wqflask/templates/oauth2/register_user.html create mode 100644 gn2/wqflask/templates/oauth2/request_error.html create mode 100644 gn2/wqflask/templates/oauth2/resources.html create mode 100644 gn2/wqflask/templates/oauth2/role.html create mode 100644 gn2/wqflask/templates/oauth2/view-group-role.html create mode 100644 gn2/wqflask/templates/oauth2/view-resource.html create mode 100644 gn2/wqflask/templates/oauth2/view-user.html (limited to 'gn2/wqflask/templates/oauth2') diff --git a/gn2/wqflask/templates/oauth2/create-resource.html b/gn2/wqflask/templates/oauth2/create-resource.html new file mode 100644 index 00000000..479f4152 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/create-resource.html @@ -0,0 +1,89 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} + +{%block title%}Create Resource{%endblock%} +{%block css%} + +{%endblock%} + +{%block content%} +
+ {{profile_nav("resources", user_privileges)}} + + {{flash_me()}} + +
+
+ {%if resource_category_error%} +

+ +   + {{resource_category_error.error}}: + {{resource_category_error.error_message}} +

+ {%else%} +
+ +
+ Resource Category +
+ {%for category in resource_categories%} +
+ + + {{category.resource_category_description}} + +
+ {%endfor%} +
+
+ +
+ Basic Resource Information +
+ + + + The resource name, e.g. the experiment name. + +
+
+ +
+ Access Control +
+ + + + Select whether data in this resource will be publicly viewable. + +
+
+ + + +
+ {%endif%} +
+
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/create-role.html b/gn2/wqflask/templates/oauth2/create-role.html new file mode 100644 index 00000000..f2bff7b4 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/create-role.html @@ -0,0 +1,46 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("roles", user_privileges)}} +

Create Role

+ + {{flash_me()}} + + {%if group_privileges_error is defined%} + {{display_error("Group Privileges", group_privileges_error)}} + {%else%} + {%if "group:role:create-role" in user_privileges%} +
+ Create Group Role +
+ + +
+ + {%for priv in group_privileges%} +
+ +
+ {%endfor%} + + +
+ {%else%} + {{display_error("Privilege", {"error":"PrivilegeError", "error_description": "You do not have sufficient privileges to create a new role."})}} + {%endif%} + {%endif%} +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/data-list-genotype.html b/gn2/wqflask/templates/oauth2/data-list-genotype.html new file mode 100644 index 00000000..c780a583 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/data-list-genotype.html @@ -0,0 +1,166 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} + +{%block title%}Link Data: Genotype{%endblock%} + +{%block css%} + + + +{%endblock%} + +{%block content%} +
+ {{profile_nav("data", user_privileges)}} + + {{flash_me()}} + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + {%for dataset in datasets:%} + + + + + + + + {%else%} + + + + {%endfor%} + + +
+ + +
+{%endblock%} + +{%block js%} + + +{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/data-list-mrna.html b/gn2/wqflask/templates/oauth2/data-list-mrna.html new file mode 100644 index 00000000..0e163235 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/data-list-mrna.html @@ -0,0 +1,168 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} + +{%block title%}Link Data: Genotype{%endblock%} + +{%block css%} + + + +{%endblock%} + +{%block content%} +
+ {{profile_nav("data", user_privileges)}} + + {{flash_me()}} + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + + + + + + + + + + + + {%for dataset in datasets:%} + + + + + + + + + {%else%} + + + + {%endfor%} + + +
+ + +
+{%endblock%} + +{%block js%} + + +{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/data-list-phenotype.html b/gn2/wqflask/templates/oauth2/data-list-phenotype.html new file mode 100644 index 00000000..8c79c0d6 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/data-list-phenotype.html @@ -0,0 +1,209 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} + +{%block title%}Link Data: Phenotype{%endblock%} + +{%block css%} + + + +{%endblock%} + +{%block content%} + +
+ {{profile_nav("data", user_privileges)}} + + {{flash_me()}} + +
+ +
+ +
+ +
+ +
+ +
+ {%if dataset_type == "mrna"%} + mRNA: Search + {%else%} + + {{dataset_type}}: Search + + {%endif%} + + + + +
+ +
+ species:{{species_name}} AND + +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + {%for trait in traits%} + + + + + + + + + + + + + + {%else%} + + + + {%endfor%} + + +
+ +
+ +{%endblock%} + +{%block js%} + + +{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/data-list.html b/gn2/wqflask/templates/oauth2/data-list.html new file mode 100644 index 00000000..8a8f6694 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/data-list.html @@ -0,0 +1,53 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}Link Data{%endblock%} +{%block content%} +
+ {{profile_nav("data", user_privileges)}} + + {{flash_me()}} + +
+
+ Search + {%if species_error is defined%} + {{display_error("Species", species_error)}} + {%elif species | length == 0%} + + +   + No list of species to select from + {%else%} +
+ + +
+ +
+ + +
+ + + {%endif%} +
+
+
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/display_error.html b/gn2/wqflask/templates/oauth2/display_error.html new file mode 100644 index 00000000..9abe02c4 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/display_error.html @@ -0,0 +1,10 @@ +{%macro display_error(title, the_error)%} + +{{title}}: + + +  +{{the_error.error}}: +{{the_error.error_description}} + +{%endmacro%} diff --git a/gn2/wqflask/templates/oauth2/group.html b/gn2/wqflask/templates/oauth2/group.html new file mode 100644 index 00000000..f4c29d18 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/group.html @@ -0,0 +1,114 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("group", user_privileges)}} + + {{flash_me()}} + + {%if group_error is defined%} +
+ {{display_error("Group", group_error)}} +
+ {%else%} +
+
+ {%if group_join_requests_error is defined %} + {{display_error("Join Requests", group_join_requests_error)}} + {%else%} + + Requests ({{group_join_requests | count}}) + + {%endif%} +
+
+ + + + + + + + + + + + + + + + + + + + {%for key,val in group.group_metadata.items()%} + + + + + {%endfor%} + + +
Group Information
NameMetadataActions
+ {{group.group_name}} + KeyValue + Edit + + Delete +
{{key.split("_") | map("capitalize") | join(" ")}}{{val}}
+
+
+ +
+ + + + + + + + + + + + + {%for user in users%} + + + + + + {%else%} + + + + {%endfor%} + +
Group Users
NameEmailActions
{{user.name}}{{user.email}} + Remove +
+ {%if user_error is defined%} + + +   + {{user_error.error}} + {{user_error.error_description}} + {%else%} + No users found for this group + {%endif%} +
+ +
+ {%endif%} + +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/group_join_or_create.html b/gn2/wqflask/templates/oauth2/group_join_or_create.html new file mode 100644 index 00000000..8255d2f8 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/group_join_or_create.html @@ -0,0 +1,99 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%block title%}Join or Create Group{%endblock%} + +{%block css%} + +{%endblock%} +{%block content%} +
+ {{profile_nav("group", user_privileges)}} + +

Join or Create Group

+ + {{flash_me()}} + + {%if group_join_request is defined and group_join_request.exists %} +

+ +   + You have an active request to join a group. +

+ +

+ You cannot create a group, or request to join a new group until your + currently active request has been either accepted or rejected. +

+ {%else%} +

You can

+ + {%if groups | length > 0 %} +
+

+ For most users, this is the preffered choice. You request access to an + existing group, and the group leader will chose whether or not to add you to + their group.

+ +

You can only be a member of a single group.

+
+ +
+ Request to be added to group +
+ + +
+
+ +
+
+ +

or

+ {%else%} +

+ +   + There an currently no groups to join. +

+ {%endif%} + +
+

+ Creating a new group automatically makes you that group's administrator. +

+ +

You can only be a member of a single group.

+
+ +
+ Create a new group +
+ + + + Name of the group. + +
+
+ + + + A description to help identify the purpose/goal of the group + +
+
+ +
+
+ {%endif%} +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/join-requests.html b/gn2/wqflask/templates/oauth2/join-requests.html new file mode 100644 index 00000000..833b4e93 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/join-requests.html @@ -0,0 +1,73 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("group", user_privileges)}} + + {{flash_me()}} + +
+
+ + + + + + + + + + + + + + + {%for request in requests%} + + + + + + + + + + {%else%} + + + + {%endfor%} + +
Join Requests
NameEmailRequest Date/TimeStatusMessageActions
{{request.name}}{{request.email}}{{datetime_string(request.timestamp)}}{{request.status}}{{request.message}} +
+ + +
+
+
+ + +
+
+ {%if error is defined %} + {{display_error("Join Requests", error)}} + {%else%} + No one has requested to join your group yet. + {%endif%} +
+
+
+
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/list_roles.html b/gn2/wqflask/templates/oauth2/list_roles.html new file mode 100644 index 00000000..a4061fca --- /dev/null +++ b/gn2/wqflask/templates/oauth2/list_roles.html @@ -0,0 +1,80 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("roles", user_privileges)}} +

Roles

+ + {{flash_me()}} + +
+
+

Your System-Level Roles

+
    + {%for role in roles %} +
  • + {{role.role_name}} +
  • + {%else%} +
  • +   + No roles attached to this user +
  • + {%endfor%} +
+
+ +
+

Group-Wide Roles

+ + {%if "group:role:create-role" in user_privileges%} + New Group Role + {%endif%} + + {%if group_roles_error is defined%} + {{display_error("Group Roles", group_role_error)}} + {%else%} + + + + + + + + + + {%for grole in group_roles%} + + + + + {%else%} + + + + {%endfor%} + +
Group Roles
Role NameActions
{{grole.role.role_name}} + + View + +
+ + +   + No group roles found +
+ {%endif%} +
+ +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/login.html b/gn2/wqflask/templates/oauth2/login.html new file mode 100644 index 00000000..eaa1a192 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/login.html @@ -0,0 +1,47 @@ +{%extends "base.html"%} +{%block title%}Login{%endblock%} +{%block content%} +
+

Sign in here.

+ +
+
+ Sign in with Genenetwork + {{flash_me()}} +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/masquerade.html b/gn2/wqflask/templates/oauth2/masquerade.html new file mode 100644 index 00000000..48ec6cee --- /dev/null +++ b/gn2/wqflask/templates/oauth2/masquerade.html @@ -0,0 +1,39 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}Masquerade As{%endblock%} +{%block content%} +
+ {{profile_nav("masquerade", user_privileges)}} + + {{flash_me()}} + + {%if users_error is defined%} + {{display_error("Users", users_error)}} + {%else%} +
+
+
+ Masquerade As +
+ + +
+
+ +
+
+
+
+ {%endif%} +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/profile_nav.html b/gn2/wqflask/templates/oauth2/profile_nav.html new file mode 100644 index 00000000..aa752905 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/profile_nav.html @@ -0,0 +1,64 @@ +{%macro profile_nav(calling_page, user_sys_privileges)%} + + + +{%endmacro%} diff --git a/gn2/wqflask/templates/oauth2/register_user.html b/gn2/wqflask/templates/oauth2/register_user.html new file mode 100644 index 00000000..27ccbd30 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/register_user.html @@ -0,0 +1,62 @@ +{%extends "base.html"%} +{%block title%}Register New User{%endblock%} +{%block content%} +
+

Register User

+ +
+
+ Register User + {{flash_me()}} +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/request_error.html b/gn2/wqflask/templates/oauth2/request_error.html new file mode 100644 index 00000000..e6ed5fff --- /dev/null +++ b/gn2/wqflask/templates/oauth2/request_error.html @@ -0,0 +1,32 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("error", user_privileges)}} +

ERROR

+ + {{flash_me()}} + +
+ +
+
+
Error code
+
{{response.status}}[{{response.status_code}}]
+ +
URI
+
{{response.url}}
+ +
Content Type
+
{{response.content_type or "-"}}
+ +
{{response.content}}
+
{{response.content}}
+
+
+ +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/resources.html b/gn2/wqflask/templates/oauth2/resources.html new file mode 100644 index 00000000..c52043db --- /dev/null +++ b/gn2/wqflask/templates/oauth2/resources.html @@ -0,0 +1,58 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("resources", user_privileges)}} +

Resources

+ + {{flash_me()}} + +
+ + +
+ + + + + + + + + + {%for resource in resources %} + + + + + {%else%} + + + + {%endfor%} + +
Resources
NameCategory
+ + {{resource.resource_name}} + + {{resource.resource_category.resource_category_key}}
+   + + The user has no access to any resource. + +
+
+ +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/role.html b/gn2/wqflask/templates/oauth2/role.html new file mode 100644 index 00000000..c33c93ee --- /dev/null +++ b/gn2/wqflask/templates/oauth2/role.html @@ -0,0 +1,56 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("roles", user_privileges)}} +

Role: {{role.role_name}}

+ + {{flash_me()}} + +
+
+
+
+ {{role.role_name}} +
+
+ + + + + + {%for privilege in role.privileges:%} + + + + + {%else%} + + + + + {%endfor%} + +
privilege iddescription
{{privilege.privilege_id}}{{privilege.privilege_description}}
+ +   + + No privileges found for this role. +
+
+ +
+
+ +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/view-group-role.html b/gn2/wqflask/templates/oauth2/view-group-role.html new file mode 100644 index 00000000..5da023bf --- /dev/null +++ b/gn2/wqflask/templates/oauth2/view-group-role.html @@ -0,0 +1,102 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("roles", user_privileges)}} +

View Group Role

+ + {{flash_me()}} + +
+
+

Role Details

+ {%if group_role_error is defined%} + {{display_error("Group Role", group_role_error)}} + {%else%} + + + + + + + + + + + {%for privilege in group_role.role.privileges%} + + + + + + {%endfor%} + +
Details for '{{group_role.role.role_name}}' Role
PrivilegeDescriptionAction
{{privilege.privilege_id}}{{privilege.privilege_description}} +
+ + +
+
+ {%endif%} +
+ +
+

Other Privileges

+ + + + + + + + + + + + {%for priv in group_privileges%} + + + + + + {%else%} + + + + {%endfor%} + +
Other Privileges not Assigned to this Role
PrivilegeDescriptionAction
{{priv.privilege_id}}{{priv.privilege_description}} +
+ + +
+
+ + +   + All privileges assigned! +
+
+ +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/view-resource.html b/gn2/wqflask/templates/oauth2/view-resource.html new file mode 100644 index 00000000..275fcb24 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/view-resource.html @@ -0,0 +1,352 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%from "oauth2/display_error.html" import display_error%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("resources", user_privileges)}} +

Resources

+ + {{flash_me()}} + +
+ + {%if resource_error is defined %} + {{display_error("Resource", resource_error)}} + {%else%} +
+

Resource Details

+ + + + + + + + + + + + + + + + + + + +
Resource: {{resource.resource_name}}
NameCategoryActions
{{resource.resource_name}}{{resource.resource_category.resource_category_description}} +
+ +
+ {%if resource.public%} + + {%else%} + + {%endif%} +
+
+
+ Edit + + Delete +
+
+ +
+

Resource Data

+ + + + + {%if resource.resource_category.resource_category_key == "phenotype"%} + + + + {%endif%} + + + + + + + + {%for data_item in resource.resource_data:%} + + {%if resource.resource_category.resource_category_key == "phenotype"%} + + + + {%endif%} + + + + + {%else%} + + + + {%endfor%} + +
Resource Data
TraitDescriptionYearDataset NameFull NameActions
+ + {{data_item.PublishXRefId}} + + {{data_item.description}} + {%if data_item.PubMed_ID%} + + {{data_item.Year}} + + {%else%} + {{data_item.Year}} + {%endif%} + + + {{data_item.dataset_name}} + + {{data_item.dataset_fullname}} +
+ + + +
+
+ + +   + No linked data. +
+
+ + + + + +
+
+ +
+

Unlinked Data

+ + + + + {%if resource.resource_category.resource_category_key == "phenotype"%} + + + + {%endif%} + + + + + + + {%if unlinked_error is defined%} + {{display_error("Unlinked Data Error", unlinked_error)}} + {%else%} + {%for data_item in unlinked_data:%} + + {%if resource.resource_category.resource_category_key == "phenotype"%} + + + + {%endif%} + + + + + {%else%} + + +   + No data to link. + {%endfor%} + {%endif%} + +
Link Data
TraitDescriptionYearDataset NameDataset FullNameActions
+ + {{data_item.PublishXRefId}} + + {{data_item.description}} + {%if data_item.PubMed_ID%} + + {{data_item.Year}} + + {%else%} + {{data_item.Year}} + {%endif%} + + + {{data_item.dataset_name}} + + {{data_item.dataset_fullname}} +
+ + + + +
+
+
+ +
+

User Roles

+ {%if users_n_roles_error is defined%} + {{display_error("Users and Roles", users_n_roles_error)}} + {%else%} + + + + + + + + + + + + {%for user_row in users_n_roles%} + + + + + + + + {%for grole in user_row.roles%} + + + + + {%endfor%} + {%else%} + + + + {%endfor%} + +
User Roles
User EmailUser NameUser GroupAssigned Roles
{{user_row.user.email}}{{user_row.user.name}} + {{user_row.user_group.group_name}}RoleAction
+ + {{grole.role_name}} + + +
+ + + +
+
+ + +   + + There are no users assigned any role for this resource. + +
+ {%endif%} +
+ +
+

Assign

+ {%if group_roles_error is defined%} + {{display_error("Group Roles", group_roles_error)}} + {%elif users_error is defined%} + {{display_error("Users", users_error)}} + {%else%} +
+ +
+ + +
+
+ + + + {%for user in users%} + + {%endfor%} + +
+ + +
+ {%endif%} +
+ {%endif%} + +
+ +
+{%endblock%} diff --git a/gn2/wqflask/templates/oauth2/view-user.html b/gn2/wqflask/templates/oauth2/view-user.html new file mode 100644 index 00000000..34526b14 --- /dev/null +++ b/gn2/wqflask/templates/oauth2/view-user.html @@ -0,0 +1,48 @@ +{%extends "base.html"%} +{%from "oauth2/profile_nav.html" import profile_nav%} +{%block title%}View User{%endblock%} +{%block content%} +
+ {{profile_nav("dashboard", user_privileges)}} +

View User

+ + {{flash_me()}} + +
+
+ {%if user_details%} +

Name: {{user_details.name}}

+

E-Mail: {{user_details.email}}

+ {%if user_details.group%} +

Group:{{user_details.group.group_name}}

+ {%else%} +

+ +   + User is not a member of a group. +

+ + {%if group_join_request is defined and group_join_request.exists %} +

+ +   + You have an active join request to a group. +

+ {%else%} +

+ Join or Create group +

+ {%endif%} + + {%endif%} + {%else%} +

No details found.

+ {%endif%} +
+ +
+ +
+{%endblock%} -- cgit v1.2.3