From 167929ffd775787bd841d34a8f55e2a4dfd7c84d Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 15 Nov 2024 14:32:05 +0530 Subject: [PATCH] fix: added manage billing button in navbar settings dropdown --- frappe/boot.py | 2 +- frappe/hooks.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frappe/boot.py b/frappe/boot.py index 4a04e898be..b21ec6afd6 100644 --- a/frappe/boot.py +++ b/frappe/boot.py @@ -139,7 +139,7 @@ def load_conf_settings(bootinfo): from frappe.core.api.file import get_max_file_size bootinfo.max_file_size = get_max_file_size() - for key in ("developer_mode", "socketio_port", "file_watcher_port"): + for key in ("developer_mode", "socketio_port", "file_watcher_port", "fc_communication_secret"): if key in frappe.conf: bootinfo[key] = frappe.conf.get(key) diff --git a/frappe/hooks.py b/frappe/hooks.py index 6e4423e663..fa709fdb96 100644 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -482,6 +482,13 @@ standard_navbar_items = [ "action": "frappe.quick_edit('Workspace Settings')", "is_standard": 1, }, + { + "item_label": "Manage Billing", + "item_type": "Route", + "route": "/billing", + "is_standard": 1, + "condition": "frappe.boot.fc_communication_secret && frappe.boot.setup_complete && !frappe.is_mobile() && frappe.user.has_role('System Manager')", + }, { "item_label": "Session Defaults", "item_type": "Action",