From 69db0889251c48bc316787a53fd9c5bdd9ab4b8c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 13 Nov 2025 08:34:53 -0700 Subject: [PATCH] Update the permissions app_defaults to be more efficient --- core/permissions/app_defaults.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/core/permissions/app_defaults.php b/core/permissions/app_defaults.php index a57bef6f42..1985b2fba3 100644 --- a/core/permissions/app_defaults.php +++ b/core/permissions/app_defaults.php @@ -3,15 +3,9 @@ if ($domains_processed == 1) { //add the permissions - $sql = "select * from v_permissions \n"; - $database_permissions = $database->select($sql, null, 'all'); - - //get the $apps array from the installed apps from the core and mod directories - $config_list = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/*/*/app_config.php"); - $x = 0; - foreach ($config_list as $config_path) { - include($config_path); - $x++; + if (empty($database_permissions)) { + $sql = "select * from v_permissions \n"; + $database_permissions = $database->select($sql, null, 'all'); } //restore default permissions