1
0

Fix showing edit buttons when the user does not have the rights to use them

This commit is contained in:
kolaente
2021-06-03 16:27:41 +02:00
parent c92062b6a5
commit 0cd9d43a7c
5 changed files with 15 additions and 7 deletions

View File

@ -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)