mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-06 22:08:52 +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>
|
||||
<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"
|
||||
v-on="listeners"
|
||||
>
|
||||
|
@ -24,5 +32,6 @@ export default {
|
|||
name: 'GridViewRowExpandButtonWithCommentCount',
|
||||
functional: true,
|
||||
components: { GridViewRowExpandButton },
|
||||
inject: { $hasPermission: '$hasPermission' },
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -64,6 +64,8 @@
|
|||
<component
|
||||
:is="rowExpandButton"
|
||||
:row="row"
|
||||
:group-id="groupId"
|
||||
:table="view.table"
|
||||
@edit-modal="$emit('edit-modal', row)"
|
||||
></component>
|
||||
<component
|
||||
|
@ -120,7 +122,16 @@ export default {
|
|||
name: 'GridViewRow',
|
||||
components: { GridViewRowExpandButton, GridViewCell, RecursiveWrapper },
|
||||
mixins: [gridViewHelpers],
|
||||
provide() {
|
||||
return {
|
||||
$hasPermission: this.$hasPermission,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
view: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
groupId: {
|
||||
type: Number,
|
||||
required: true,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<GridViewRow
|
||||
v-for="(row, index) in rows"
|
||||
:key="`row-${row.id}`"
|
||||
:view="view"
|
||||
:group-id="groupId"
|
||||
:row="row"
|
||||
:fields="fields"
|
||||
|
|
Loading…
Add table
Reference in a new issue