|
|
|
@ -5,10 +5,10 @@ import { ViewTypes } from 'nocodb-sdk';
|
|
|
|
|
import { ConfigService } from '@nestjs/config'; |
|
|
|
|
import { useAgent } from 'request-filtering-agent'; |
|
|
|
|
import type { AppConfig } from '~/interface/config'; |
|
|
|
|
import {NC_APP_SETTINGS, NC_ATTACHMENT_FIELD_SIZE} from '~/constants'; |
|
|
|
|
import { NC_APP_SETTINGS, NC_ATTACHMENT_FIELD_SIZE } from '~/constants'; |
|
|
|
|
import SqlMgrv2 from '~/db/sql-mgr/v2/SqlMgrv2'; |
|
|
|
|
import { NcError } from '~/helpers/catchError'; |
|
|
|
|
import {Base, Store, User} from '~/models'; |
|
|
|
|
import { Base, Store, User } from '~/models'; |
|
|
|
|
import Noco from '~/Noco'; |
|
|
|
|
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2'; |
|
|
|
|
import { MetaTable } from '~/utils/globals'; |
|
|
|
@ -368,10 +368,9 @@ export class UtilsService {
|
|
|
|
|
|
|
|
|
|
let settings: { invite_only_signup?: boolean } = {}; |
|
|
|
|
try { |
|
|
|
|
settings = JSON.parse((await Store.get(NC_APP_SETTINGS))?.value); |
|
|
|
|
settings = JSON.parse((await Store.get(NC_APP_SETTINGS, true))?.value); |
|
|
|
|
} catch {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const oidcAuthEnabled = !!( |
|
|
|
|
process.env.NC_OIDC_ISSUER && |
|
|
|
|
process.env.NC_OIDC_AUTHORIZATION_URL && |
|
|
|
@ -391,10 +390,10 @@ export class UtilsService {
|
|
|
|
|
type: 'rest', |
|
|
|
|
env: process.env.NODE_ENV, |
|
|
|
|
googleAuthEnabled: !!( |
|
|
|
|
process.env.NC_GOOGLE_CLIENT_ID && process.env.NC_GOOGLE_CLIENT_SECRET |
|
|
|
|
process.env.NC_GOOGLE_CLIENT_ID && process.env.NC_GOOGLE_CLIENT_SECRET |
|
|
|
|
), |
|
|
|
|
githubAuthEnabled: !!( |
|
|
|
|
process.env.NC_GITHUB_CLIENT_ID && process.env.NC_GITHUB_CLIENT_SECRET |
|
|
|
|
process.env.NC_GITHUB_CLIENT_ID && process.env.NC_GITHUB_CLIENT_SECRET |
|
|
|
|
), |
|
|
|
|
oidcAuthEnabled, |
|
|
|
|
oidcProviderName, |
|
|
|
@ -402,8 +401,8 @@ export class UtilsService {
|
|
|
|
|
connectToExternalDB: !process.env.NC_CONNECT_TO_EXTERNAL_DB_DISABLED, |
|
|
|
|
version: packageVersion, |
|
|
|
|
defaultLimit: Math.max( |
|
|
|
|
Math.min(defaultLimitConfig.limitDefault, defaultLimitConfig.limitMax), |
|
|
|
|
defaultLimitConfig.limitMin, |
|
|
|
|
Math.min(defaultLimitConfig.limitDefault, defaultLimitConfig.limitMax), |
|
|
|
|
defaultLimitConfig.limitMin, |
|
|
|
|
), |
|
|
|
|
defaultGroupByLimit: defaultGroupByLimitConfig, |
|
|
|
|
timezone: defaultConnectionConfig.timezone, |
|
|
|
@ -420,10 +419,10 @@ export class UtilsService {
|
|
|
|
|
disableEmailAuth: this.configService.get('auth.disableEmailAuth', { |
|
|
|
|
infer: true, |
|
|
|
|
}), |
|
|
|
|
mainSubDomain: this.configService.get('mainSubDomain', {infer: true}), |
|
|
|
|
dashboardPath: this.configService.get('dashboardPath', {infer: true}), |
|
|
|
|
mainSubDomain: this.configService.get('mainSubDomain', { infer: true }), |
|
|
|
|
dashboardPath: this.configService.get('dashboardPath', { infer: true }), |
|
|
|
|
inviteOnlySignup: settings.invite_only_signup, |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|