[feat] admin impersonate user (#3741)

This commit is contained in:
Vlad Stan
2026-02-25 07:53:47 +01:00
committed by dni ⚡
parent 87b66c554a
commit 9be894da74
13 changed files with 359 additions and 19 deletions
+14
View File
@@ -438,6 +438,20 @@ window.PageUsers = {
this.activeUser.show = false
}
},
async impersonateUser(user_id) {
try {
await LNbits.api.impersonateUser(user_id)
LNbits.utils.backupLocalStorage('impersonation', true)
this.$q.localStorage.setItem('lnbits.disclaimerShown', true)
window.location = '/wallet'
} catch (error) {
console.warn(error)
Quasar.Notify.create({
type: 'warning',
message: 'Failed to impersonate user!'
})
}
},
async showWalletPayments(walletId) {
this.activeUser.show = false
await this.fetchWallets(this.users[0].id)