Fix RPC -32002 "Access denied" errors by adding proper ACL permissions for all new catalog source and version management methods. ## Problem New RPC methods added in Phases 1-3 were accessible in the RPCD backend but lacked ACL (Access Control List) permissions, causing browser errors: ``` RPCError: RPC call to luci.secubox/get_catalog_sources failed with error -32002: Access denied RPCError: RPC call to luci.secubox/check_updates failed with error -32002: Access denied ``` ## Solution Updated `/usr/share/rpcd/acl.d/luci-app-secubox-admin.json` to grant permissions for all 7 new methods introduced in the multi-source AppStore. ### Read Permissions (added 5 methods) These methods only read data and don't modify system state: - `get_catalog_sources` - List configured catalog sources - `check_updates` - Check for available app updates - `get_app_versions` - Get version info for specific app - `get_changelog` - Retrieve app changelog - `get_widget_data` - Get widget metrics for dashboard ### Write Permissions (added 2 methods) These methods modify system configuration: - `set_catalog_source` - Set active catalog source (UCI write) - `sync_catalog` - Trigger catalog synchronization ### UCI Access (added 1 config) Added `secubox-appstore` to UCI read/write lists for source management. ## Files Changed **Modified**: - `luci-app-secubox-admin/root/usr/share/rpcd/acl.d/luci-app-secubox-admin.json` - Read permissions: 9 → 14 methods - Write permissions: 6 → 8 methods - UCI access: Added `secubox-appstore` - `luci-app-secubox-admin/Makefile` - PKG_RELEASE: 2 → 3 ## Deployment After updating the package: 1. `opkg install luci-app-secubox-admin_*.ipk` 2. ACL file automatically installed to `/usr/share/rpcd/acl.d/` 3. RPCD reloads ACLs automatically 4. Methods now accessible from LuCI frontend No manual RPCD restart required - ACL changes are picked up automatically. ## Verification Test with: ```bash ubus -S call luci.secubox get_catalog_sources ubus -S call luci.secubox check_updates ``` Should return data instead of "Access denied" error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| share | ||