Fix super user bypass and show virtual accounts in admin UI
Two related fixes for account access: 1. **Super user bypass for permission filtering** - Super users now bypass permission checks and see all accounts - Fixes issue where Castle system account was blocked from seeing accounts - Regular users still get filtered by permissions as expected 2. **Show virtual accounts in permissions management UI** - Permissions page now passes exclude_virtual=false - Admins need to see virtual accounts to grant permissions on them - Enables granting permission on 'Expenses:Supplies' to give access to all children Impact: - Super user can now create entries and see all accounts ✓ - Admins can grant permissions on virtual parent accounts ✓ - Regular users still only see permitted, non-virtual accounts ✓ - Permission inheritance works correctly for all users ✓ 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
0e6fe3e3cd
commit
7506b0250f
2 changed files with 9 additions and 3 deletions
|
|
@ -155,9 +155,10 @@ window.app = Vue.createApp({
|
|||
|
||||
async loadAccounts() {
|
||||
try {
|
||||
// Admin permissions UI needs to see virtual accounts to grant permissions on them
|
||||
const response = await LNbits.api.request(
|
||||
'GET',
|
||||
'/castle/api/v1/accounts',
|
||||
'/castle/api/v1/accounts?exclude_virtual=false',
|
||||
this.g.user.wallets[0].inkey
|
||||
)
|
||||
this.accounts = response.data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue