From c8e6a9c35235f09b52ef0d01fd4db0a0169078e2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 3 Jul 2023 11:41:23 +0300 Subject: UX: Improve error messages Make the error messages a little less cryptic in order to improve the user's experience of the site. --- wqflask/wqflask/templates/show_trait.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html index 84231d34..aff12571 100644 --- a/wqflask/wqflask/templates/show_trait.html +++ b/wqflask/wqflask/templates/show_trait.html @@ -126,7 +126,11 @@ {%else%} - {{display_error("Access Denied", {"error": "AuthorisationError", "error_description": "No read access for user '" + user.name + "'."})}} + {%if user.name == "Anonymous User"%} + {{display_error("Access Denied", {"error": "AuthorisationError", "error_description": "This trait is not accessible for the general public yet. Please log in."})}} + {%else%} + {{display_error("Access Denied", {"error": "AuthorisationError", "error_description": "The user '" + user.name + "', does not currently possess the appropriate privileges to view this trait. If you know the owner of this trait, please request that they grant you access, or wait until it is made public."})}} + {%endif%} {%endif%} -- cgit v1.2.3