mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 14:46:01 +00:00
SYNC: next permissions
This commit is contained in:
committed by
Diflow
parent
fcb5811f37
commit
cd97647818
@@ -11,37 +11,38 @@
|
||||
import AdminPremiumPromoWidget from './AdminPremiumPromoWidget.svelte';
|
||||
import PublicCloudWidget from './PublicCloudWidget.svelte';
|
||||
import PrivateCloudWidget from './PrivateCloudWidget.svelte';
|
||||
import hasPermission from '../utility/hasPermission';
|
||||
</script>
|
||||
|
||||
<DatabaseWidget hidden={$visibleSelectedWidget != 'database'} />
|
||||
|
||||
{#if $visibleSelectedWidget == 'file'}
|
||||
{#if $visibleSelectedWidget == 'file' && hasPermission('widgets/file')}
|
||||
<FilesWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'history'}
|
||||
{#if $visibleSelectedWidget == 'history' && hasPermission('widgets/history')}
|
||||
<HistoryWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'archive'}
|
||||
{#if $visibleSelectedWidget == 'archive' && hasPermission('widgets/archive')}
|
||||
<ArchiveWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'plugins'}
|
||||
{#if $visibleSelectedWidget == 'plugins' && hasPermission('widgets/plugins')}
|
||||
<PluginsWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'cell-data'}
|
||||
{#if $visibleSelectedWidget == 'cell-data' && hasPermission('widgets/cell-data')}
|
||||
<CellDataWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'app'}
|
||||
{#if $visibleSelectedWidget == 'app' && hasPermission('widgets/app')}
|
||||
<AppWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'admin'}
|
||||
{#if $visibleSelectedWidget == 'admin' && hasPermission('widgets/admin')}
|
||||
<AdminMenuWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'premium'}
|
||||
<AdminPremiumPromoWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'cloud-public'}
|
||||
{#if $visibleSelectedWidget == 'cloud-public' && hasPermission('widgets/cloud-public')}
|
||||
<PublicCloudWidget />
|
||||
{/if}
|
||||
{#if $visibleSelectedWidget == 'cloud-private'}
|
||||
{#if $visibleSelectedWidget == 'cloud-private' && hasPermission('widgets/cloud-private')}
|
||||
<PrivateCloudWidget />
|
||||
{/if}
|
||||
|
||||
@@ -110,21 +110,21 @@
|
||||
{ command: 'settings.show' },
|
||||
{ command: 'theme.changeTheme' },
|
||||
{ command: 'settings.commands' },
|
||||
{
|
||||
hasPermission('widgets/app') && {
|
||||
text: 'View applications',
|
||||
onClick: () => {
|
||||
$selectedWidget = 'app';
|
||||
$visibleWidgetSideBar = true;
|
||||
},
|
||||
},
|
||||
{
|
||||
hasPermission('widgets/plugins') && {
|
||||
text: 'Manage plugins',
|
||||
onClick: () => {
|
||||
$selectedWidget = 'plugins';
|
||||
$visibleWidgetSideBar = true;
|
||||
},
|
||||
},
|
||||
{
|
||||
hasPermission('application-log') && {
|
||||
text: 'View application logs',
|
||||
onClick: () => {
|
||||
openNewTab({
|
||||
|
||||
Reference in New Issue
Block a user