mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-28 13:58:40 +02:00
Fix:Account tags accessible #542
This commit is contained in:
parent
8b0ed2bf29
commit
22e3d4a150
1 changed files with 5 additions and 4 deletions
|
@ -86,7 +86,6 @@
|
||||||
<ui-toggle-switch v-model="newUser.permissions.accessAllTags" @input="accessAllTagsToggled" />
|
<ui-toggle-switch v-model="newUser.permissions.accessAllTags" @input="accessAllTagsToggled" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!newUser.permissions.accessAllTags" class="my-4">
|
<div v-if="!newUser.permissions.accessAllTags" class="my-4">
|
||||||
<ui-multi-select-dropdown v-model="newUser.itemTagsAccessible" :items="itemTags" label="Tags Accessible to User" />
|
<ui-multi-select-dropdown v-model="newUser.itemTagsAccessible" :items="itemTags" label="Tags Accessible to User" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -181,9 +180,7 @@ export default {
|
||||||
if (this.$refs.modal) this.$refs.modal.setHide()
|
if (this.$refs.modal) this.$refs.modal.setHide()
|
||||||
},
|
},
|
||||||
accessAllTagsToggled(val) {
|
accessAllTagsToggled(val) {
|
||||||
if (!val && !this.newUser.itemTagsAccessible.length) {
|
if (val && this.newUser.itemTagsAccessible.length) {
|
||||||
this.newUser.itemTagsAccessible = this.libraries.map((l) => l.id)
|
|
||||||
} else if (val && this.newUser.itemTagsAccessible.length) {
|
|
||||||
this.newUser.itemTagsAccessible = []
|
this.newUser.itemTagsAccessible = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -216,6 +213,10 @@ export default {
|
||||||
this.$toast.error('Must select at least one library')
|
this.$toast.error('Must select at least one library')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.newUser.permissions.accessAllTags && !this.newUser.itemTagsAccessible.length) {
|
||||||
|
this.$toast.error('Must select at least one tag')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
this.submitCreateAccount()
|
this.submitCreateAccount()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue