Skip to content

Commit

Permalink
update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap committed Oct 14, 2024
1 parent 37b842a commit 7300b29
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 14 deletions.
3 changes: 3 additions & 0 deletions apps/server/src/infra/encryption/encryption.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export interface EncryptionConfig {
AES_KEY: string;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export interface SchulconnexClientConfig {
SCHULCONNEX_CLIENT__PERSONEN_INFO_TIMEOUT_IN_MS: number;
SCHULCONNEX_CLIENT__API_URL?: string;
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT?: string;
SCHULCONNEX_CLIENT__CLIENT_ID?: string;
SCHULCONNEX_CLIENT__CLIENT_SECRET?: string;
}
1 change: 1 addition & 0 deletions apps/server/src/modules/board/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { BoardConfig } from './board.config';
export { MediaBoardConfig } from './media-board.config';
export { BoardModule } from './board.module';
export { AnyElementContentBody, LinkContentBody, RichTextContentBody } from './controller/dto';
export {
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/modules/oauth/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './interface';
export * from './oauth.module';
export * from './service';
export { OauthConfig } from './oauth.config';
4 changes: 4 additions & 0 deletions apps/server/src/modules/oauth/oauth.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface OauthConfig {
FEATURE_OAUTH_LOGIN: boolean;
FEATURE_LOGIN_LINK_ENABLED: boolean;
}
23 changes: 9 additions & 14 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import { Configuration } from '@hpi-schul-cloud/commons';
import { XApiKeyConfig } from '@infra/auth-guard';
import { EncryptionConfig } from '@infra/encryption/encryption.config';
import type { IdentityManagementConfig } from '@infra/identity-management';
import type { MailConfig } from '@infra/mail/interfaces/mail-config';
import type { SchulconnexClientConfig } from '@infra/schulconnex-client';
import type { TspClientConfig } from '@infra/tsp-client';
import type { AccountConfig } from '@modules/account';
import { AlertConfig } from '@modules/alert';
import type { AuthenticationConfig } from '@modules/authentication';
import type { BoardConfig } from '@modules/board';
import type { MediaBoardConfig } from '@modules/board/media-board.config';
import type { BoardConfig, MediaBoardConfig } from '@modules/board';
import type { CollaborativeTextEditorConfig } from '@modules/collaborative-text-editor';
import { DeletionConfig } from '@modules/deletion';
import type { FilesStorageClientConfig } from '@modules/files-storage-client';
import { SynchronizationConfig } from '@modules/idp-console';
import type { LearnroomConfig } from '@modules/learnroom';
import type { LessonConfig } from '@modules/lesson';
import { OauthConfig } from '@modules/oauth';
import { ProvisioningConfig } from '@modules/provisioning';
import { RoomConfig } from '@modules/room';
import type { SchoolConfig } from '@modules/school';
Expand All @@ -28,7 +29,7 @@ import type { UserLoginMigrationConfig } from '@modules/user-login-migration';
import type { VideoConferenceConfig } from '@modules/video-conference';
import type { BbbConfig } from '@modules/video-conference/bbb';
import type { LanguageType } from '@shared/domain/interface';
import type { SchulcloudTheme } from '@shared/domain/types';
import { SchulcloudTheme } from '@shared/domain/types';
import type { CoreModuleConfig } from '@src/core';
import type { Timezone } from './types/timezone.enum';

Expand Down Expand Up @@ -71,7 +72,9 @@ export interface ServerConfig
BbbConfig,
TspClientConfig,
AlertConfig,
ShdConfig {
ShdConfig,
OauthConfig,
EncryptionConfig {
NODE_ENV: NodeEnvType;
SC_DOMAIN: string;
HOST: string;
Expand All @@ -95,9 +98,7 @@ export interface ServerConfig
FEATURE_COLUMN_BOARD_SHARE: boolean;
FEATURE_COLUMN_BOARD_SOCKET_ENABLED: boolean;
FEATURE_BOARD_LAYOUT_ENABLED: boolean;
FEATURE_LOGIN_LINK_ENABLED: boolean;
FEATURE_CONSENT_NECESSARY: boolean;
FEATURE_SCHOOL_SANIS_USER_MIGRATION_ENABLED: boolean;
FEATURE_ALLOW_INSECURE_LDAP_URL_ENABLED: boolean;
GHOST_BASE_URL: string;
ROCKETCHAT_SERVICE_ENABLED: boolean;
Expand All @@ -108,14 +109,10 @@ export interface ServerConfig
SC_THEME: SchulcloudTheme;
SC_TITLE: string;
TRAINING_URL: string;
FEATURE_SHOW_OUTDATED_USERS: boolean;
FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED: boolean;
FEATURE_ENABLE_LDAP_SYNC_DURING_MIGRATION: boolean;
FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED: boolean;
FEATURE_SHOW_NEW_ROOMS_VIEW_ENABLED: boolean;
FEATURE_SHOW_MIGRATION_WIZARD: boolean;
MIGRATION_WIZARD_DOCUMENTATION_LINK?: string;
FEATURE_OTHER_GROUPUSERS_PROVISIONING_ENABLED: boolean;
FEATURE_TLDRAW_ENABLED: boolean;
TLDRAW__ASSETS_ENABLED: boolean;
TLDRAW__ASSETS_MAX_SIZE: number;
Expand All @@ -125,10 +122,6 @@ export interface ServerConfig
I18N__FALLBACK_LANGUAGE: LanguageType;
I18N__DEFAULT_TIMEZONE: Timezone;
BOARD_COLLABORATION_URI: string;
SCHULCONNEX_CLIENT__API_URL: string | undefined;
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: string | undefined;
SCHULCONNEX_CLIENT__CLIENT_ID: string | undefined;
SCHULCONNEX_CLIENT__CLIENT_SECRET: string | undefined;
FEATURE_AI_TUTOR_ENABLED: boolean;
FEATURE_ROOMS_ENABLED: boolean;
FEATURE_TSP_SYNC_ENABLED: boolean;
Expand Down Expand Up @@ -316,6 +309,8 @@ const config: ServerConfig = {
ROCKET_CHAT_ADMIN_USER: Configuration.get('ROCKET_CHAT_ADMIN_USER') as string,
ROCKET_CHAT_ADMIN_PASSWORD: Configuration.get('ROCKET_CHAT_ADMIN_PASSWORD') as string,
CTL_TOOLS__PREFERRED_TOOLS_LIMIT: Configuration.get('CTL_TOOLS__PREFERRED_TOOLS_LIMIT') as number,
AES_KEY: Configuration.get('AES_KEY') as string,
FEATURE_OAUTH_LOGIN: Configuration.get('FEATURE_OAUTH_LOGIN') as boolean,
};

export const serverConfig = () => config;
Expand Down
1 change: 1 addition & 0 deletions apps/server/src/modules/user-import/user-import-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface UserImportConfig {
FEATURE_USER_MIGRATION_SYSTEM_ID: string;
FEATURE_MIGRATION_WIZARD_WITH_USER_LOGIN_MIGRATION: boolean;
IMPORTUSER_SAVE_ALL_MATCHES_REQUEST_TIMEOUT_MS: number;
MIGRATION_WIZARD_DOCUMENTATION_LINK?: string;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export interface UserLoginMigrationConfig {
MIGRATION_END_GRACE_PERIOD_MS: number;
FEATURE_SCHOOL_SANIS_USER_MIGRATION_ENABLED: boolean;
FEATURE_MIGRATION_WIZARD_WITH_USER_LOGIN_MIGRATION: boolean;
FEATURE_SHOW_MIGRATION_WIZARD: boolean;
FEATURE_SHOW_OUTDATED_USERS: boolean;
}

0 comments on commit 7300b29

Please sign in to comment.