File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
from frappe .core .api .file import get_max_file_size
4
4
from frappe .translate import get_all_translations
5
5
from frappe .utils import cstr , split_emails , validate_email_address
6
+ from frappe .utils .modules import get_modules_from_all_apps_for_user
6
7
from frappe .utils .telemetry import POSTHOG_HOST_FIELD , POSTHOG_PROJECT_FIELD
7
8
8
9
@@ -63,10 +64,10 @@ def check_app_permission():
63
64
if frappe .session .user == "Administrator" :
64
65
return True
65
66
66
- # allowed_modules = frappe.utils.modules. get_modules_from_all_apps_for_user()
67
- # allowed_modules = [x["module_name"] for x in allowed_modules]
68
- # if "FCRM" not in allowed_modules:
69
- # return False
67
+ allowed_modules = get_modules_from_all_apps_for_user ()
68
+ allowed_modules = [x ["module_name" ] for x in allowed_modules ]
69
+ if "FCRM" not in allowed_modules :
70
+ return False
70
71
71
72
roles = frappe .get_roles ()
72
73
if any (
You can’t perform that action at this time.
0 commit comments