mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Add view that displays user information, including:
- name - email - phone number - services - last login - failed login attempts if any The view can be accessed from results of find_users_by_email logged_in_at added to User serialization on admin frontend as a part of this work
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from flask import abort, render_template, request, url_for
|
||||
from flask import render_template, request
|
||||
from flask_login import login_required
|
||||
|
||||
from app import user_api_client
|
||||
from app.main import main
|
||||
from app.utils import user_is_platform_admin
|
||||
from app.main.forms import SearchUsersByEmailForm
|
||||
from app.utils import user_is_platform_admin
|
||||
|
||||
|
||||
@main.route("/find-users-by-email", methods=['GET', 'POST'])
|
||||
@@ -23,3 +23,14 @@ def find_users_by_email():
|
||||
form=form,
|
||||
users_found=users_found
|
||||
), status
|
||||
|
||||
|
||||
@main.route("/users/<user_id>", methods=['GET'])
|
||||
@login_required
|
||||
@user_is_platform_admin
|
||||
def user_information(user_id):
|
||||
user = user_api_client.get_user(user_id)
|
||||
return render_template(
|
||||
'views/find-users/user-information.html',
|
||||
user=user
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user