Fix showing edit buttons when the user does not have the rights to use them
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
@focusout="() => saveBucketTitle(bucket.id)"
|
||||
@keydown.enter.prevent.stop="() => saveBucketTitle(bucket.id)"
|
||||
class="title input"
|
||||
contenteditable="true"
|
||||
:contenteditable="canWrite"
|
||||
spellcheck="false">{{ bucket.title }}</h2>
|
||||
<span
|
||||
:class="{'is-max': bucket.tasks.length >= bucket.limit}"
|
||||
|
@ -509,6 +509,9 @@ export default {
|
||||
this.loadTask()
|
||||
},
|
||||
computed: {
|
||||
currentList() {
|
||||
return this.$store.state[CURRENT_LIST]
|
||||
},
|
||||
parent() {
|
||||
if (!this.task.listId) {
|
||||
return {
|
||||
@ -522,11 +525,11 @@ export default {
|
||||
}
|
||||
|
||||
const list = this.$store.getters['namespaces/getListAndNamespaceById'](this.task.listId)
|
||||
this.$store.commit(CURRENT_LIST, list.list)
|
||||
this.$store.commit(CURRENT_LIST, list !== null ? list.list : this.currentList)
|
||||
return list
|
||||
},
|
||||
canWrite() {
|
||||
return this.task && this.task.maxRight && this.task.maxRight > rights.READ
|
||||
return typeof this.task !== 'undefined' && typeof this.task.maxRight !== 'undefined' && this.task.maxRight > rights.READ
|
||||
},
|
||||
updatedSince() {
|
||||
return this.formatDateSince(this.task.updated)
|
||||
|
Reference in New Issue
Block a user