diff --git a/packages/nc-gui/pages/nc/base/_shared_base_id.vue b/packages/nc-gui/pages/nc/base/_shared_base_id.vue index ca31b5c125..0b0537013b 100644 --- a/packages/nc-gui/pages/nc/base/_shared_base_id.vue +++ b/packages/nc-gui/pages/nc/base/_shared_base_id.vue @@ -86,7 +86,7 @@ export default { }, methods: { showLargerVersion() { - window.open(location.href.replace(/embed&?/, ''), '_blank') + window.open(location.href.replace(/([?&])embed&?/, '$1'), '_blank') }, tableCreate(table) { if (this.$refs.treeview) { diff --git a/packages/nc-gui/store/tabs.js b/packages/nc-gui/store/tabs.js index f474a15bcb..1998d87d2a 100644 --- a/packages/nc-gui/store/tabs.js +++ b/packages/nc-gui/store/tabs.js @@ -239,6 +239,25 @@ export const actions = { type: 'roles' } }) + } else { + await dispatch('project/_loadTables', { + dbKey: '0.projectJson.envs._noco.db.0', + key: '0.projectJson.envs._noco.db.0.tables', + _nodes: { + dbAlias: 'db', + // dbKey: "0.projectJson.envs._noco.db.0", + env: '_noco', + // key: "0.projectJson.envs._noco.db.0.tables", + type: 'tableDir' + } + }, { root: true }) + const nodes = rootState.project + .list[0] // project + .children[0] // environment + .children[0] // db + .children.find(n => n.type === 'tableDir') // parent node + .children + if (nodes && nodes[0]) { tabs.push(nodes[0]) } } } commit('list', tabs) diff --git a/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts b/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts index f6f12e41ef..db25b21c75 100644 --- a/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts +++ b/packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts @@ -222,7 +222,7 @@ export default class RestAuthCtrl { 'jwt', { session: false }, (_err, user, _info) => { - if (user) { + if (user && !req.headers['xc-shared-base-id']) { if ( req.path.indexOf('/user/me') === -1 && req.header('xc-preview') &&