Compare commits
No commits in common. "1edd126a43dc4fb1e2767c9175e553b98374da70" and "0f2a38ee7ff5987a7c0e0aa17d5846d790a13102" have entirely different histories.
1edd126a43
...
0f2a38ee7f
1 changed files with 1 additions and 25 deletions
|
|
@ -709,7 +709,7 @@ window.app = Vue.createApp({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async editRole(role) {
|
editRole(role) {
|
||||||
this.editingRole = true
|
this.editingRole = true
|
||||||
this.selectedRole = role
|
this.selectedRole = role
|
||||||
this.roleForm = {
|
this.roleForm = {
|
||||||
|
|
@ -717,28 +717,6 @@ window.app = Vue.createApp({
|
||||||
description: role.description || '',
|
description: role.description || '',
|
||||||
is_default: role.is_default || false
|
is_default: role.is_default || false
|
||||||
}
|
}
|
||||||
this.rolePermissionsForView = []
|
|
||||||
this.roleUsersForView = []
|
|
||||||
|
|
||||||
try {
|
|
||||||
const response = await LNbits.api.request(
|
|
||||||
'GET',
|
|
||||||
`/libra/api/v1/admin/roles/${role.id}`,
|
|
||||||
this.g.user.wallets[0].adminkey
|
|
||||||
)
|
|
||||||
this.rolePermissionsForView = [...(response.data.permissions || [])]
|
|
||||||
this.roleUsersForView = [...(response.data.users || [])]
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed to load role details:', error)
|
|
||||||
this.$q.notify({
|
|
||||||
type: 'negative',
|
|
||||||
message: 'Failed to load role permissions',
|
|
||||||
caption: error.message || 'Unknown error',
|
|
||||||
timeout: 5000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.$nextTick()
|
|
||||||
this.showCreateRoleDialog = true
|
this.showCreateRoleDialog = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -846,8 +824,6 @@ window.app = Vue.createApp({
|
||||||
this.showCreateRoleDialog = false
|
this.showCreateRoleDialog = false
|
||||||
this.editingRole = false
|
this.editingRole = false
|
||||||
this.selectedRole = null
|
this.selectedRole = null
|
||||||
this.roleUsersForView = []
|
|
||||||
this.rolePermissionsForView = []
|
|
||||||
this.resetRoleForm()
|
this.resetRoleForm()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue