|
|
@ -44,18 +44,19 @@ const NOCO_RELEASE = 'NOCO_RELEASE'; |
|
|
|
|
|
|
|
|
|
|
|
export default class NcMetaMgr { |
|
|
|
export default class NcMetaMgr { |
|
|
|
public projectConfigs = {}; |
|
|
|
public projectConfigs = {}; |
|
|
|
|
|
|
|
|
|
|
|
public readonly pluginMgr: NcPluginMgr; |
|
|
|
public readonly pluginMgr: NcPluginMgr; |
|
|
|
|
|
|
|
|
|
|
|
public twilioInstance: Twilio; |
|
|
|
public twilioInstance: Twilio; |
|
|
|
|
|
|
|
|
|
|
|
protected app: Noco; |
|
|
|
protected app: Noco; |
|
|
|
|
|
|
|
|
|
|
|
protected config: NcConfig; |
|
|
|
protected config: NcConfig; |
|
|
|
protected listener: (data) => Promise<any>; |
|
|
|
protected listener: (data) => Promise<any>; |
|
|
|
protected xcMeta: NcMetaIO; |
|
|
|
protected xcMeta: NcMetaIO; |
|
|
|
protected projectMgr: any; |
|
|
|
protected projectMgr: any; |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
protected isEe = false; |
|
|
|
protected isEe = false; |
|
|
|
|
|
|
|
protected readonly INVALID_PASSWORD_ERROR = 'Invalid password'; |
|
|
|
|
|
|
|
|
|
|
|
constructor(app: Noco, config: NcConfig, xcMeta: NcMetaIO) { |
|
|
|
constructor(app: Noco, config: NcConfig, xcMeta: NcMetaIO) { |
|
|
|
this.app = app; |
|
|
|
this.app = app; |
|
|
@ -3452,6 +3453,14 @@ export default class NcMetaMgr { |
|
|
|
throw new Error('Not found'); |
|
|
|
throw new Error('Not found'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
viewMeta && |
|
|
|
|
|
|
|
viewMeta.password && |
|
|
|
|
|
|
|
viewMeta.password !== args.args.password |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
throw new Error(this.INVALID_PASSWORD_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tn = args.args?.tn; |
|
|
|
const tn = args.args?.tn; |
|
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
@ -3504,6 +3513,18 @@ export default class NcMetaMgr { |
|
|
|
}) |
|
|
|
}) |
|
|
|
.first(); |
|
|
|
.first(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!viewMeta) { |
|
|
|
|
|
|
|
throw new Error('Not found'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
viewMeta && |
|
|
|
|
|
|
|
viewMeta.password && |
|
|
|
|
|
|
|
viewMeta.password !== args.args.password |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
throw new Error(this.INVALID_PASSWORD_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const queryParams = JSON.parse(viewMeta.query_params); |
|
|
|
const queryParams = JSON.parse(viewMeta.query_params); |
|
|
|
// const meta = JSON.parse(viewMeta.meta);
|
|
|
|
// const meta = JSON.parse(viewMeta.meta);
|
|
|
|
|
|
|
|
|
|
|
@ -3548,6 +3569,14 @@ export default class NcMetaMgr { |
|
|
|
throw new Error('Not found'); |
|
|
|
throw new Error('Not found'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
|
|
viewMeta && |
|
|
|
|
|
|
|
viewMeta.password && |
|
|
|
|
|
|
|
viewMeta.password !== args.args.password |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
throw new Error(this.INVALID_PASSWORD_ERROR); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// todo : filter out columns of related table
|
|
|
|
// todo : filter out columns of related table
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const apiBuilder = this.app?.projectBuilders |
|
|
|
const apiBuilder = this.app?.projectBuilders |
|
|
|