Browse Source

fix: show/hide table based on role in GUI

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/852/head
Pranav C 3 years ago
parent
commit
2c47180acf
  1. 2
      packages/nc-gui/store/sqlMgr.js
  2. 6
      packages/nocodb/src/lib/noco/meta/NcMetaMgrEE.ts

2
packages/nc-gui/store/sqlMgr.js

@ -28,7 +28,7 @@ function translateUiToLibCall(args, op, opArgs) {
data.module = 'table' data.module = 'table'
break break
case 'xcTableAndViewList': case 'xcTableAndViewList':
data.api = 'DB_TABLE_VIEW_LIST' data.api = 'DB_TABLE_LIST'
data.type = 'List' data.type = 'List'
data.title = 'list' data.title = 'list'
data.module = 'table' data.module = 'table'

6
packages/nocodb/src/lib/noco/meta/NcMetaMgrEE.ts

@ -425,7 +425,7 @@ export default class NcMetaMgrEE extends NcMetaMgr {
disabled: d.disabled[role] disabled: d.disabled[role]
}, },
{ {
type: args.args.type, type: d.type,
title: d[field], title: d[field],
role, role,
...props ...props
@ -438,7 +438,7 @@ export default class NcMetaMgrEE extends NcMetaMgr {
this.getDbAlias(args), this.getDbAlias(args),
'nc_disabled_models_for_role', 'nc_disabled_models_for_role',
{ {
type: args.args.type, type: d.type,
title: d[field], title: d[field],
role, role,
...props ...props
@ -452,7 +452,7 @@ export default class NcMetaMgrEE extends NcMetaMgr {
'nc_disabled_models_for_role', 'nc_disabled_models_for_role',
{ {
disabled: d.disabled[role], disabled: d.disabled[role],
type: args.args.type, type: d.type,
title: d[field], title: d[field],
role, role,
...props ...props

Loading…
Cancel
Save