Merge pull request #22555 from cogk/fix-notpermittedpage-redirect-if-startwith-app

This commit is contained in:
Suraj Shetty 2023-10-10 13:29:04 +05:30 committed by GitHub
commit 3a5f8ecaa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,7 +15,7 @@ class NotPermittedPage(TemplatePage):
def render(self):
action = f"/login?redirect-to={frappe.request.path}"
if frappe.request.path.startswith("/app"):
if frappe.request.path.startswith("/app/") or frappe.request.path == "/app":
action = "/login"
frappe.local.message_title = _("Not Permitted")
frappe.local.response["context"] = dict(