Make sure to respect board acls in the frontend all over the place

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-01-25 13:37:17 +01:00
parent 7fd8419fa9
commit 1a874ba79b
11 changed files with 150 additions and 71 deletions

View File

@@ -29,7 +29,10 @@
<p />
</div>
<div v-else-if="board" class="board">
<Container lock-axix="y" orientation="horizontal" @drop="onDropStack">
<Container lock-axix="y"
orientation="horizontal"
:drag-handle-selector="dragHandleSelector"
@drop="onDropStack">
<Draggable v-for="stack in stacksByBoard" :key="stack.id">
<Stack :stack="stack" />
</Draggable>
@@ -46,7 +49,7 @@
<script>
import { Container, Draggable } from 'vue-smooth-dnd'
import { mapState } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import Controls from '../Controls'
import Stack from './Stack'
@@ -77,9 +80,15 @@ export default {
board: state => state.currentBoard,
showArchived: state => state.showArchived,
}),
...mapGetters([
'canEdit',
]),
stacksByBoard() {
return this.$store.getters.stacksByBoard(this.board.id)
},
dragHandleSelector() {
return this.canEdit ? null : '.no-drag'
},
},
watch: {
id: 'fetchData',