From 64efb20f2b018df8e0007ef425695504488c24c0 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 19 Jun 2025 23:20:23 +0900 Subject: [PATCH] Fix incorrect defaults shown in module grant screen --- modules/module/module.admin.model.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/module/module.admin.model.php b/modules/module/module.admin.model.php index 982c4502c..0be94b122 100644 --- a/modules/module/module.admin.model.php +++ b/modules/module/module.admin.model.php @@ -171,9 +171,18 @@ class ModuleAdminModel extends Module $grant_list->manager->title = lang('grant_manager'); $grant_list->manager->default = 'manager'; Context::set('grant_list', $grant_list); + // Get a permission group granted to the current module $selected_group = array(); $default_grant = array(); + foreach ($grant_list as $key => $val) + { + if (!empty($val->default)) + { + $default_grant[$key] = $val->default; + } + } + $args = new stdClass(); $args->module_srl = $module_srl; $output = executeQueryArray('module.getModuleGrants', $args);