Skip to content

Commit

Permalink
fix: hide Create Column button if no permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
  • Loading branch information
enjeck authored and backportbot[bot] committed Jun 17, 2024
1 parent 6295a40 commit 37cdf2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/main/sections/EmptyTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template #icon>
{{ table.emoji }}
</template>
<template #action>
<template v-if="canManageTable(table)" #action>
<NcButton :aria-label="t('table', 'Create column')" type="primary" @click="createColumn()">
{{ t('tables', 'Create column') }}
</NcButton>
Expand All @@ -14,13 +14,15 @@
<script>
import { NcEmptyContent, NcButton } from '@nextcloud/vue'
import { emit } from '@nextcloud/event-bus'
import permissionsMixin from '../../../shared/components/ncTable/mixins/permissionsMixin.js'
export default {
name: 'EmptyTable',
components: {
NcEmptyContent,
NcButton,
},
mixins: [permissionsMixin],
props: {
table: {
type: Object,
Expand Down

0 comments on commit 37cdf2d

Please sign in to comment.