1
0
forked from test/crm

Merge pull request #736 from frappe/mergify/bp/main-hotfix/pr-735

fix: restrict app in apps page if no access to FCRM module (backport #735)
This commit is contained in:
Shariq Ansari 2025-04-13 20:13:42 +05:30 committed by GitHub
commit 1798da43ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,6 @@ from bs4 import BeautifulSoup
from frappe.core.api.file import get_max_file_size
from frappe.translate import get_all_translations
from frappe.utils import cstr, split_emails, validate_email_address
from frappe.utils.modules import get_modules_from_all_apps_for_user
from frappe.utils.telemetry import POSTHOG_HOST_FIELD, POSTHOG_PROJECT_FIELD
@ -64,7 +63,7 @@ def check_app_permission():
if frappe.session.user == "Administrator":
return True
allowed_modules = get_modules_from_all_apps_for_user()
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