mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-13 08:41:46 +00:00
Resolve "Viewers can see row comment counts"
This commit is contained in:
parent
50bcc2ee3c
commit
fec16fd0b0
3 changed files with 22 additions and 1 deletions
premium/web-frontend/modules/baserow_premium/components/row_comments
web-frontend/modules/database/components/view/grid
|
@ -1,6 +1,14 @@
|
||||||
<template functional>
|
<template functional>
|
||||||
<GridViewRowExpandButton
|
<GridViewRowExpandButton
|
||||||
v-if="!props.row || !props.row._.metadata.row_comment_count"
|
v-if="
|
||||||
|
!props.row ||
|
||||||
|
!props.row._.metadata.row_comment_count ||
|
||||||
|
!injections.$hasPermission(
|
||||||
|
'database.table.list_comments',
|
||||||
|
props.table,
|
||||||
|
props.groupId
|
||||||
|
)
|
||||||
|
"
|
||||||
:row="props.row"
|
:row="props.row"
|
||||||
v-on="listeners"
|
v-on="listeners"
|
||||||
>
|
>
|
||||||
|
@ -24,5 +32,6 @@ export default {
|
||||||
name: 'GridViewRowExpandButtonWithCommentCount',
|
name: 'GridViewRowExpandButtonWithCommentCount',
|
||||||
functional: true,
|
functional: true,
|
||||||
components: { GridViewRowExpandButton },
|
components: { GridViewRowExpandButton },
|
||||||
|
inject: { $hasPermission: '$hasPermission' },
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -64,6 +64,8 @@
|
||||||
<component
|
<component
|
||||||
:is="rowExpandButton"
|
:is="rowExpandButton"
|
||||||
:row="row"
|
:row="row"
|
||||||
|
:group-id="groupId"
|
||||||
|
:table="view.table"
|
||||||
@edit-modal="$emit('edit-modal', row)"
|
@edit-modal="$emit('edit-modal', row)"
|
||||||
></component>
|
></component>
|
||||||
<component
|
<component
|
||||||
|
@ -120,7 +122,16 @@ export default {
|
||||||
name: 'GridViewRow',
|
name: 'GridViewRow',
|
||||||
components: { GridViewRowExpandButton, GridViewCell, RecursiveWrapper },
|
components: { GridViewRowExpandButton, GridViewCell, RecursiveWrapper },
|
||||||
mixins: [gridViewHelpers],
|
mixins: [gridViewHelpers],
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
$hasPermission: this.$hasPermission,
|
||||||
|
}
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
|
view: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
groupId: {
|
groupId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true,
|
required: true,
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<GridViewRow
|
<GridViewRow
|
||||||
v-for="(row, index) in rows"
|
v-for="(row, index) in rows"
|
||||||
:key="`row-${row.id}`"
|
:key="`row-${row.id}`"
|
||||||
|
:view="view"
|
||||||
:group-id="groupId"
|
:group-id="groupId"
|
||||||
:row="row"
|
:row="row"
|
||||||
:fields="fields"
|
:fields="fields"
|
||||||
|
|
Loading…
Add table
Reference in a new issue