Skip to content

Commit d468c16

Browse files
Fixed more issues found while testing role permissions feature. #7310
1 parent fcf7cf5 commit d468c16

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

web/pgadmin/static/js/Theme/dark.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default function(basicSettings) {
6060
'400': '#333333',
6161
'600': '#282828',
6262
'800': '#1e1e1e',
63+
'900': '#8A8A8A',
6364
},
6465
text: {
6566
primary: '#d4d4d4',
@@ -72,7 +73,7 @@ export default function(basicSettings) {
7273
},
7374
custom: {
7475
checkbox: {
75-
borderColor: '#4a4a4a',
76+
borderColor: '#8A8A8A',
7677
disabled: '#6b6b6b'
7778
},
7879
icon: {

web/pgadmin/static/js/Theme/high_contrast.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default function(basicSettings) {
5858
'400': '#2D3A48',
5959
'600': '#1F2932',
6060
'800': '#010B15',
61+
'900': '#8b9cac'
6162
},
6263
text: {
6364
primary: '#fff',
@@ -70,7 +71,7 @@ export default function(basicSettings) {
7071
},
7172
custom: {
7273
checkbox: {
73-
borderColor: '#A6B7C8',
74+
borderColor: '#8b9cac',
7475
disabled: '#6b6b6b'
7576
},
7677
icon: {

web/pgadmin/static/js/Theme/light.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export default function(basicSettings) {
5858
'400': '#ebeef3',
5959
'600': '#bac1cd',
6060
'800': '#848ea0',
61+
'900': '#646B82',
6162
},
6263
text: {
6364
primary: '#222',
@@ -70,7 +71,7 @@ export default function(basicSettings) {
7071
},
7172
custom: {
7273
checkbox: {
73-
borderColor: '#bac1cd',
74+
borderColor: '#646B82',
7475
disabled: '#ebeef3'
7576
},
7677
icon: {

web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffButtonComponent.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { FilterIcon } from '../../../../../static/js/components/ExternalIcon';
2424
import { PgMenu, PgMenuItem, usePgMenuGroup } from '../../../../../static/js/components/Menu';
2525
import { FILTER_NAME, MENUS, MENUS_COMPARE_CONSTANT, SCHEMA_DIFF_EVENT, IGNORE_OPTION } from '../SchemaDiffConstants';
2626
import { SchemaDiffContext, SchemaDiffEventsContext } from './SchemaDiffComponent';
27+
import withCheckPermission from '../../../../../browser/static/js/withCheckPermission';
28+
import { AllPermissionTypes } from '../../../../../browser/static/js/constants';
2729

2830

2931
const Root = styled('div')(({theme}) => ({
@@ -152,9 +154,12 @@ export function SchemaDiffButtonComponent({ sourceData, targetData, selectedRowI
152154
onServerSchemaChange();
153155
};
154156

155-
const generateScript = () => {
157+
// Check permission and call.
158+
const generateScript = withCheckPermission({
159+
permission: AllPermissionTypes.TOOLS_QUERY_TOOL
160+
}, () => {
156161
eventBus.fireEvent(SCHEMA_DIFF_EVENT.TRIGGER_GENERATE_SCRIPT, { sid: targetData.sid, did: targetData.did, selectedIds: selectedRowIds, rows: rows, selectedFilters: selectedFilters });
157-
};
162+
});
158163

159164
return (
160165
(<Root>

0 commit comments

Comments
 (0)