fix: add informative guest message
This commit is contained in:
parent
479c304eae
commit
28947b33dd
1 changed files with 1 additions and 1 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue