Browse Source

feat: add config options

pull/7569/head
Pranav C 9 months ago
parent
commit
3878d6b022
  1. 2
      packages/nc-gui/composables/useGlobal/state.ts
  2. 2
      packages/nc-gui/composables/useGlobal/types.ts
  3. 11
      packages/nocodb/src/services/utils.service.ts

2
packages/nc-gui/composables/useGlobal/state.ts

@ -96,6 +96,8 @@ export function useGlobalState(storageKey = 'nocodb-gui-v2'): State {
googleAuthEnabled: false,
oidcAuthEnabled: false,
oidcProviderName: null,
samlAuthEnabled: false,
samlProviderName: null,
ncMin: false,
oneClick: false,
baseHasAdmin: false,

2
packages/nc-gui/composables/useGlobal/types.ts

@ -35,6 +35,8 @@ export interface AppInfo {
mainSubDomain?: string
dashboardPath: string
inviteOnlySignup: boolean
samlAuthEnabled: boolean
samlProviderName: string | null
}
export interface StoredState {

11
packages/nocodb/src/services/utils.service.ts

@ -383,6 +383,15 @@ export class UtilsService {
? process.env.NC_OIDC_PROVIDER_NAME ?? 'OpenID Connect'
: null;
const samlAuthEnabled = !!(
process.env.NC_SAML_ISSUER &&
process.env.NC_SAML_ENTRY_POINT &&
process.env.NC_SAML_CERT
);
const samlProviderName = samlAuthEnabled
? process.env.NC_SAML_PROVIDER_NAME ?? 'SAML'
: null;
const result = {
authType: 'jwt',
baseHasAdmin,
@ -422,6 +431,8 @@ export class UtilsService {
mainSubDomain: this.configService.get('mainSubDomain', { infer: true }),
dashboardPath: this.configService.get('dashboardPath', { infer: true }),
inviteOnlySignup: settings.invite_only_signup,
samlProviderName,
samlAuthEnabled,
};
return result;

Loading…
Cancel
Save