handle permissions

This commit is contained in:
Jan Prochazka
2024-08-27 16:32:53 +02:00
parent 74adf1dd3f
commit 94dc292dc9
11 changed files with 101 additions and 56 deletions

View File

@@ -20,6 +20,7 @@
<script lang="ts">
import getElectron from '../utility/getElectron';
import hasPermission from '../utility/hasPermission';
import ToolStripCommandButton from './ToolStripCommandButton.svelte';
import ToolStripDropDownButton from './ToolStripDropDownButton.svelte';
@@ -36,8 +37,10 @@
}
</script>
{#if quickExportHandlerRef}
<ToolStripDropDownButton menu={getExportMenu} {label} icon="icon export" />
{:else}
<ToolStripCommandButton {command} />
{#if hasPermission('dbops/export')}
{#if quickExportHandlerRef}
<ToolStripDropDownButton menu={getExportMenu} {label} icon="icon export" />
{:else}
<ToolStripCommandButton {command} />
{/if}
{/if}