SYNC: settings permissions

This commit is contained in:
SPRINX0\prochazka
2025-09-04 09:15:46 +02:00
committed by Diflow
parent 3ca514c85b
commit 8ced6aa205
4 changed files with 26 additions and 24 deletions

View File

@@ -70,7 +70,7 @@ registerCommand({
category: 'Theme',
name: 'Change',
toolbarName: 'Change theme',
onClick: () => showModal(SettingsModal, { selectedTab: 2 }),
onClick: () => showModal(SettingsModal, { selectedTab: 'theme' }),
// getSubCommands: () => get(extensions).themes.map(themeCommand),
});
@@ -692,8 +692,8 @@ if (isProApp()) {
icon: 'icon compare',
testEnabled: () =>
getCurrentDatabase() != null &&
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql')
&& hasPermission(`dbops/export`),
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql') &&
hasPermission(`dbops/export`),
onClick: () => {
openNewTab(
{
@@ -754,6 +754,7 @@ if (hasPermission('settings/change')) {
props: {},
});
},
testEnabled: () => hasPermission('settings/change'),
});
registerCommand({
@@ -762,6 +763,7 @@ if (hasPermission('settings/change')) {
name: 'Change',
toolbarName: 'Settings',
onClick: () => showModal(SettingsModal),
testEnabled: () => hasPermission('settings/change'),
});
}