mirror of
https://github.com/dbgate/dbgate
synced 2024-11-21 23:39:46 +00:00
ad hoc permissions (TODO improve)
This commit is contained in:
parent
d888feeaf8
commit
bf1a89ee21
@ -1 +1,3 @@
|
||||
DEVMODE=1
|
||||
# DISABLE_SHELL=1
|
||||
# HIDE_APP_EDITOR=1
|
@ -32,6 +32,7 @@ module.exports = {
|
||||
return {
|
||||
runAsPortal: !!connections.portalConnections,
|
||||
singleDatabase: connections.singleDatabase,
|
||||
hideAppEditor: !!process.env.HIDE_APP_EDITOR,
|
||||
permissions,
|
||||
...currentVersion,
|
||||
};
|
||||
|
@ -149,6 +149,10 @@ module.exports = {
|
||||
|
||||
start_meta: true,
|
||||
async start({ script }) {
|
||||
if (process.env.DISABLE_SHELL) {
|
||||
return { errorMessage: 'Shell is disabled' };
|
||||
}
|
||||
|
||||
const runid = uuidv1();
|
||||
return this.startCore(runid, scriptTemplate(script, false));
|
||||
},
|
||||
|
@ -3,6 +3,7 @@
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
import { currentDropDownMenu, selectedWidget, visibleCommandPalette, visibleHamburgerMenuWidget } from '../stores';
|
||||
import mainMenuDefinition from '../../../../app/src/mainMenuDefinition';
|
||||
import { useConfig } from '../utility/metadataLoaders';
|
||||
|
||||
let domSettings;
|
||||
let domMainMenu;
|
||||
@ -77,6 +78,8 @@
|
||||
const items = mainMenuDefinition;
|
||||
currentDropDownMenu.set({ left, top, items });
|
||||
}
|
||||
|
||||
$: config = useConfig();
|
||||
</script>
|
||||
|
||||
<div class="main">
|
||||
@ -85,7 +88,7 @@
|
||||
<FontIcon icon="icon menu" />
|
||||
</div>
|
||||
{/if}
|
||||
{#each widgets as item}
|
||||
{#each widgets.filter(x => !$config?.hideAppEditor || x.name != 'app') as item}
|
||||
<div class="wrapper" class:selected={item.name == $selectedWidget} on:click={() => handleChangeWidget(item.name)}>
|
||||
<FontIcon icon={item.icon} title={item.title} />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user