fix: system-hub components - Add getTheme() and update ACL

Fixed two issues preventing components page from loading:

1. Added getTheme() method to theme.js
   - components.js was calling Theme.getTheme() which didn't exist
   - Added method to return theme data from SecuBox

2. Updated ACL to grant access to new methods
   - Added get_components and get_components_by_category to read permissions
   - Added luci.secubox methods (modules, modules_by_category, get_theme)
   - Resolves "Access denied" error (-32002)

This fixes the "Theme.getTheme is not a function" and "Access denied" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2025-12-26 17:13:53 +01:00
parent 915ce641f4
commit 34f980312f
2 changed files with 15 additions and 0 deletions

View File

@ -66,5 +66,13 @@ return baseclass.extend({
*/
getCurrentTheme: function() {
return document.documentElement.getAttribute('data-theme') || 'dark';
},
/**
* Get theme preference from SecuBox
* @returns {Promise} Promise resolving to theme data
*/
getTheme: function() {
return callGetTheme();
}
});

View File

@ -7,10 +7,17 @@
"status",
"get_system_info",
"get_health",
"get_components",
"get_components_by_category",
"list_services",
"get_logs",
"get_storage",
"get_settings"
],
"luci.secubox": [
"modules",
"modules_by_category",
"get_theme"
]
}
},