1
0
forked from test/crm

revert: restrict app in apps page if no access to FCRM module

(cherry picked from commit 0bd448a3994e0e8a166db1dfb249a9aa87d08526)
This commit is contained in:
Shariq Ansari 2025-04-14 10:35:28 +05:30 committed by Mergify
parent 31e1429485
commit a757220a82

View File

@ -63,10 +63,10 @@ def check_app_permission():
if frappe.session.user == "Administrator":
return True
allowed_modules = frappe.utils.modules.get_modules_from_all_apps_for_user()
allowed_modules = [x["module_name"] for x in allowed_modules]
if "FCRM" not in allowed_modules:
return False
# allowed_modules = frappe.utils.modules.get_modules_from_all_apps_for_user()
# allowed_modules = [x["module_name"] for x in allowed_modules]
# if "FCRM" not in allowed_modules:
# return False
roles = frappe.get_roles()
if any(