fix: add informative guest message

This commit is contained in:
sokumon 2025-05-05 16:45:50 +05:30
parent 479c304eae
commit 28947b33dd

View file

@ -666,7 +666,7 @@ def is_whitelisted(method):
is_guest = session["user"] == "Guest"
if method not in whitelisted or (is_guest and method not in guest_methods):
summary = _("You are not permitted to access this resource.")
summary = _("You are not permitted to access this resource. Login to access")
detail = _("Function {0} is not whitelisted.").format(bold(f"{method.__module__}.{method.__name__}"))
msg = f"<details><summary>{summary}</summary>{detail}</details>"
throw(msg, PermissionError, title=_("Method Not Allowed"))