fix(NotPermittedPage): Add redirect-to even if starting with /app
A page like "/appointment" would redirect to /login, but without the redirect-to parameter, which is undesired
This commit is contained in:
parent
f2277b9254
commit
443ffa06d5
1 changed files with 1 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue