Browse Source

fix: password protected shared grid view

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/679/head
Pranav C 3 years ago
parent
commit
3b24143f2b
  1. 28
      packages/nc-gui/components/project/spreadsheet/public/xcTable.vue
  2. 1
      packages/nocodb/src/lib/noco/meta/NcMetaMgrEE.ts

28
packages/nc-gui/components/project/spreadsheet/public/xcTable.vue

@ -175,7 +175,7 @@
/>
<div class="text-center">
<v-btn small color="primary" @click="loadTableData(); showPasswordModal =false">
<v-btn small color="primary" @click="unlock">
Unlock
</v-btn>
</div>
@ -284,20 +284,6 @@ export default {
modelName: null
}),
computed: {
// availableColumns() {
// let columns
// const hideCols = ['created_at', 'updated_at']
//
// if (this.showSystemFields) {
// columns = this.meta.columns || []
// } else if (this.data && this.data.length) {
// // c._cn in this.data[0].row &&
// columns = (this.meta.columns.filter(c => !(c.pk && c.ai) && !hideCols.includes(c._cn))) || []
// } else {
// columns = (this.meta && this.meta.columns && this.meta.columns.filter(c => !(c.pk && c.ai) && !hideCols.includes(c._cn))) || []
// }
// return columns
// },
concatenatedXWhere() {
let where = ''
if (this.searchField && this.searchQuery.trim()) {
@ -386,13 +372,6 @@ export default {
if (!this.showPasswordModal && !this.notFound) {
await this.loadTableData()
}
// const {list, count} = await this.api.paginatedList(this.queryParams);
// this.count = count;
// this.data = list.map(row => ({
// row,
// oldRow: {...row},
// rowMeta: {}
// }));
} catch (e) {
console.log(e)
}
@ -658,6 +637,11 @@ export default {
this.showExpandModal = true
this.selectedExpandRowIndex = row
this.selectedExpandRowMeta = rowMeta
},
async unlock() {
this.showPasswordModal = false
await this.loadMetaData()
await this.loadTableData()
}
}
}

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

@ -171,6 +171,7 @@ export default class NcMetaMgrEE extends NcMetaMgr {
}
// todo: move this logic to a common library
// todo: replace with condition prop
const privateViewWhere = queryParams.filters?.reduce?.(
(condition, filt, i) => {
if (!i && !filt.logicOp) {

Loading…
Cancel
Save