mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-26 13:49:38 +00:00
Fix user permissions restricted by tag #421
This commit is contained in:
parent
6f7d2ef4cd
commit
2276228531
4 changed files with 15 additions and 7 deletions
|
|
@ -88,7 +88,7 @@
|
|||
</div>
|
||||
|
||||
<div v-if="!newUser.permissions.accessAllTags" class="my-4">
|
||||
<ui-multi-select-dropdown v-model="newUser.itemsTagsAccessible" :items="itemTags" label="Tags Accessible to User" />
|
||||
<ui-multi-select-dropdown v-model="newUser.itemTagsAccessible" :items="itemTags" label="Tags Accessible to User" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -162,9 +162,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
accessAllTagsToggled(val) {
|
||||
if (!val) {
|
||||
this.fetchAllTags()
|
||||
}
|
||||
if (!val && !this.newUser.itemTagsAccessible.length) {
|
||||
this.newUser.itemTagsAccessible = this.libraries.map((l) => l.id)
|
||||
} else if (val && this.newUser.itemTagsAccessible.length) {
|
||||
|
|
@ -275,8 +272,11 @@ export default {
|
|||
}
|
||||
},
|
||||
init() {
|
||||
this.fetchAllTags()
|
||||
|
||||
this.isNew = !this.account
|
||||
if (this.account) {
|
||||
console.log(this.account)
|
||||
this.newUser = {
|
||||
username: this.account.username,
|
||||
password: this.account.password,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default {
|
|||
},
|
||||
selectedItems() {
|
||||
return (this.value || []).map((v) => {
|
||||
return this.items.find((i) => i.value === v) || {}
|
||||
return this.items.find((i) => i.value === v) || { text: v, value: v }
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
@ -113,6 +113,7 @@ export default {
|
|||
removeItem(itemValue) {
|
||||
var remaining = this.selected.filter((i) => i !== itemValue)
|
||||
this.$emit('input', remaining)
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.recalcMenuPos()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue