mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update permission add/remove uris
This commit is contained in:
parent
65f21c659a
commit
09b8fadc70
1 changed files with 3 additions and 3 deletions
|
@ -216,11 +216,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
onPermissionChanged ({ item, index, name, groupType, action }) {
|
onPermissionChanged ({ item, index, name, groupType, action }) {
|
||||||
const uri = 'users/permissions/' + item
|
// const uri = 'users/permissions/' + item
|
||||||
const data = { [action]: name }
|
// const data = { [action]: name }
|
||||||
const from = action === 'add' ? 'availablePermissions' : 'permissions'
|
const from = action === 'add' ? 'availablePermissions' : 'permissions'
|
||||||
const to = action === 'add' ? 'permissions' : 'availablePermissions'
|
const to = action === 'add' ? 'permissions' : 'availablePermissions'
|
||||||
api.put(uri, data).then(() => {
|
api.put(`users/permissions/${item}/${action}/${name}`).then(() => {
|
||||||
this[groupType + 'Groups'][name][from].splice(index, 1)
|
this[groupType + 'Groups'][name][from].splice(index, 1)
|
||||||
this[groupType + 'Groups'][name][to].push(item)
|
this[groupType + 'Groups'][name][to].push(item)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue