fix(portal): reroute to /logout from

This commit is contained in:
sokumon 2025-12-29 10:39:30 +05:30
parent 41a48b3d36
commit 1a3585a2d0
2 changed files with 5 additions and 3 deletions

View file

@ -179,7 +179,7 @@ def get_website_settings(context=None):
"footer_items": modify_header_footer_items(settings.footer_items),
"post_login": [
{"label": _("My Account"), "url": "/me"},
{"label": _("Log out"), "url": "/?cmd=web_logout"},
{"label": _("Log out"), "url": "/logout"},
],
}
)

View file

@ -8,6 +8,8 @@ from frappe.www.list import get_list_context, get_list_data
def get_context(context, **dict_params):
if frappe.session.user == "Guest":
raise frappe.PermissionError
frappe.local.form_dict.update(dict_params)
context.show_sidebar = True
doctype = frappe.local.form_dict.doctype
@ -15,8 +17,8 @@ def get_context(context, **dict_params):
context.meta = frappe.get_meta(doctype)
context.update(get_list_context(context, doctype) or {})
context.update(get(**frappe.local.form_dict))
context.home_page = "/portal"
context.doctype = frappe.local.form_dict.doctype
context.home_page = "/portal"
context.doctype = frappe.local.form_dict.doctype
return context