Merge pull request #19495 from shariquerik/redirect-to-fix

This commit is contained in:
Shariq Ansari 2023-01-05 21:47:07 +05:30 committed by GitHub
commit deaaa789cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,8 @@ class NotPermittedPage(TemplatePage):
def render(self):
action = f"/login?redirect-to={frappe.request.path}"
if frappe.request.path.startswith("/app"):
action = "/login"
frappe.local.message_title = _("Not Permitted")
frappe.local.response["context"] = dict(
indicator_color="red", primary_action=action, primary_label=_("Login"), fullpage=True