Merge pull request #32410 from sokumon/guest-message

fix: add informative guest message
This commit is contained in:
Soham Kulkarni 2025-05-21 19:53:45 +05:30 committed by GitHub
commit 06d5cb79b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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"))