Skip to content
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9135411
provide dof configured support mail to client
hoeppner-dataport Jan 16, 2025
e37a822
Merge branch 'main' of https://github.com/hpi-schul-cloud/schulcloud-…
hoeppner-dataport Jan 16, 2025
84dcf36
Merge branch 'main' of https://github.com/hpi-schul-cloud/schulcloud-…
hoeppner-dataport Jan 17, 2025
8118b29
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 17, 2025
fe439d3
fix test
hoeppner-dataport Jan 17, 2025
7f7e794
Merge branch 'main' of https://github.com/hpi-schul-cloud/schulcloud-…
hoeppner-dataport Jan 17, 2025
81215d9
Merge branch 'BC-8681-replace-nbc-mail-adress' of https://github.com/…
hoeppner-dataport Jan 17, 2025
4be8241
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 20, 2025
b5a3e38
use SC_CONTACT_EMAIL
hoeppner-dataport Jan 20, 2025
69d8503
Merge branch 'main' of https://github.com/hpi-schul-cloud/schulcloud-…
hoeppner-dataport Jan 20, 2025
967177b
Merge branch 'BC-8681-replace-nbc-mail-adress' of https://github.com/…
hoeppner-dataport Jan 20, 2025
5c85ab9
extend schema
hoeppner-dataport Jan 20, 2025
49079d7
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 20, 2025
2fb6c75
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 20, 2025
c21c8f0
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 21, 2025
9dd706a
chore: undo formatting changes
hoeppner-dataport Jan 21, 2025
13add45
Merge branch 'BC-8681-replace-nbc-mail-adress' of https://github.com/…
hoeppner-dataport Jan 21, 2025
37b716c
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 22, 2025
eb2d168
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 22, 2025
722a2d5
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 22, 2025
ff1f320
Merge branch 'main' into BC-8681-replace-nbc-mail-adress
hoeppner-dataport Jan 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/server/src/modules/server/api/dto/config.response.ts
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@ export class ConfigResponse {
@ApiProperty()
ACCESSIBILITY_REPORT_EMAIL: string;

@ApiProperty()
SC_CONTACT_EMAIL: string;

@ApiProperty()
FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED: boolean;

@@ -232,6 +235,7 @@ export class ConfigResponse {

constructor(config: ServerConfig) {
this.ACCESSIBILITY_REPORT_EMAIL = config.ACCESSIBILITY_REPORT_EMAIL;
this.SC_CONTACT_EMAIL = config.SC_CONTACT_EMAIL;
this.ADMIN_TABLES_DISPLAY_CONSENT_COLUMN = config.ADMIN_TABLES_DISPLAY_CONSENT_COLUMN;
this.ALERT_STATUS_URL = config.ALERT_STATUS_URL;
this.CALENDAR_SERVICE_ENABLED = config.CALENDAR_SERVICE_ENABLED;
1 change: 1 addition & 0 deletions apps/server/src/modules/server/api/test/server.api.spec.ts
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@ describe('Server Controller (API)', () => {
'ROCKETCHAT_SERVICE_ENABLED',
'SC_THEME',
'SC_TITLE',
'SC_CONTACT_EMAIL',
'TRAINING_URL',
'TEACHER_STUDENT_VISIBILITY__IS_CONFIGURABLE',
'TEACHER_STUDENT_VISIBILITY__IS_ENABLED_BY_DEFAULT',
2 changes: 2 additions & 0 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
@@ -82,6 +82,7 @@ export interface ServerConfig
SC_DOMAIN: string;
HOST: string;
ACCESSIBILITY_REPORT_EMAIL: string;
SC_CONTACT_EMAIL: string;
ADMIN_TABLES_DISPLAY_CONSENT_COLUMN: boolean;
ALERT_STATUS_URL: string | null;
CALENDAR_SERVICE_ENABLED: boolean;
@@ -131,6 +132,7 @@ export interface ServerConfig

const config: ServerConfig = {
ACCESSIBILITY_REPORT_EMAIL: Configuration.get('ACCESSIBILITY_REPORT_EMAIL') as string,
SC_CONTACT_EMAIL: Configuration.get('SC_CONTACT_EMAIL') as string,
ADMIN_TABLES_DISPLAY_CONSENT_COLUMN: Configuration.get('ADMIN_TABLES_DISPLAY_CONSENT_COLUMN') as boolean,
ALERT_STATUS_URL:
Configuration.get('ALERT_STATUS_URL') === null
5 changes: 5 additions & 0 deletions config/default.schema.json
Original file line number Diff line number Diff line change
@@ -1184,6 +1184,11 @@
"default": "/login",
"description": "Determines the url to be redirected to when the user is not authenticated"
},
"SC_CONTACT_EMAIL": {
"type": "string",
"default": "ticketsystem@dbildungscloud.de",
"description": "Email address used for contacting"
},
"ACCESSIBILITY_REPORT_EMAIL": {
"type": "string",
"default": "dbildungscloud@dataport.de",
11 changes: 7 additions & 4 deletions test/services/helpdesk/index.test.js
Original file line number Diff line number Diff line change
@@ -135,9 +135,9 @@ describe('helpdesk service', function test() {
const mailService = new MockMailService();
app.use('/mails', mailService);
const tempScTheme = Configuration.get('SUPPORT_PROBLEM_EMAIL_ADDRESS');
Configuration.set('SUPPORT_PROBLEM_EMAIL_ADDRESS', 'nbc-support@netz-21.de');
Configuration.set('SUPPORT_PROBLEM_EMAIL_ADDRESS', 'ticketsystem@niedersachsen.support');
await helpdeskService.create(postBody, { account: { userId: '0000d213816abba584714c0a' } });
expect(mailService.create.firstArg.email).to.equal('nbc-support@netz-21.de');
expect(mailService.create.firstArg.email).to.equal('ticketsystem@niedersachsen.support');
Configuration.set('SUPPORT_PROBLEM_EMAIL_ADDRESS', tempScTheme);
});

@@ -169,10 +169,13 @@ describe('helpdesk service', function test() {
const mailService = new MockMailService();
app.use('/mails', mailService);
const tempScTheme = Configuration.get('SUPPORT_WISH_EMAIL_ADDRESS');
Configuration.set('SUPPORT_WISH_EMAIL_ADDRESS', 'nbc-wunsch@netz-21.de,ticketsystem@dbildungscloud.de');
Configuration.set(
'SUPPORT_WISH_EMAIL_ADDRESS',
'ticketsystem@niedersachsen.support,ticketsystem@dbildungscloud.de'
);
await helpdeskService.create(postBody, { account: { userId: '0000d213816abba584714c0a' } });
expect(mailService.create.args.length).to.equal(2);
expect(mailService.create.args[0][0].email).to.equal('nbc-wunsch@netz-21.de');
expect(mailService.create.args[0][0].email).to.equal('ticketsystem@niedersachsen.support');
expect(mailService.create.args[1][0].email).to.equal('ticketsystem@dbildungscloud.de');
Configuration.set('SUPPORT_WISH_EMAIL_ADDRESS', tempScTheme);
});

Unchanged files with check annotations Beta

ENV NODE_ENV=production
ENV NO_COLOR="true"
CMD npm run start

Check warning on line 27 in Dockerfile

GitHub Actions / build_and_push

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
ARG BASE_IMAGE
FROM $BASE_IMAGE

Check warning on line 2 in Dockerfile.filepreview

GitHub Actions / build_and_push

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG $BASE_IMAGE results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
RUN apk add --no-cache imagemagick imagemagick-heic imagemagick-jpeg imagemagick-pdf imagemagick-raw imagemagick-svg imagemagick-tiff imagemagick-webp
// application imports
import { LegacyLogger, Logger } from '@core/logger';
import { RedisIoAdapter } from '@infra/socketio';

Check warning on line 10 in apps/server/src/apps/board-collaboration.app.ts

GitHub Actions / nest_lint

'@infra/socketio' import is restricted from being used by a pattern. apps-modules may NOT import from @apps, @infra, @shared, or migrations
import { BoardCollaborationModule } from '@modules/board/board-collaboration.app.module';
import { ExpressAdapter } from '@nestjs/platform-express';
import { SwaggerDocumentOptions } from '@nestjs/swagger';
import { DeletionConsoleModule } from '@modules/deletion-console/deletion-console.app.module';
import { BootstrapConsole } from 'nestjs-console';
async function run() {

Check warning on line 5 in apps/server/src/apps/deletion-console.app.ts

GitHub Actions / nest_lint

Missing return type on function
const bootstrap = new BootstrapConsole({
module: DeletionConsoleModule,
useDecorators: true,
/* istanbul ignore file */
/* eslint-disable no-console */
import { NestFactory } from '@nestjs/core';

Check warning on line 3 in apps/server/src/apps/h5p-editor.app.ts

GitHub Actions / nest_lint

Filename 'h5p-editor.app.ts' does not match kebabcase
import { ExpressAdapter } from '@nestjs/platform-express';
import express from 'express';
/* istanbul ignore file */
/* eslint-disable no-console */
import { LegacyLogger } from '@core/logger';

Check warning on line 3 in apps/server/src/apps/h5p-library-management.app.ts

GitHub Actions / nest_lint

Filename 'h5p-library-management.app.ts' does not match kebabcase
import { H5PLibraryManagementService } from '@modules/h5p-library-management';
import { H5PLibraryManagementModule } from '@modules/h5p-library-management/h5p-library-management.app.module';
import { NestFactory } from '@nestjs/core';
export class AppStartLoggable implements Loggable {
constructor(private readonly info: AppStartInfo) {}
getLogMessage(): LogMessage {

Check warning on line 13 in apps/server/src/apps/helpers/app-start-loggable.ts

GitHub Actions / nest_lint

Missing accessibility modifier on method definition getLogMessage
const data: LogMessageData = { appName: this.info.appName };
if (this.info.port !== undefined) {
export class PrometheusMetricsSetupStateLoggable implements Loggable {
constructor(private readonly state: PrometheusMetricsSetupState) {}
getLogMessage(): LogMessage {

Check warning on line 22 in apps/server/src/apps/helpers/metrics/prometheus-metrics.ts

GitHub Actions / nest_lint

Missing accessibility modifier on method definition getLogMessage
return {
message: 'Setting up Prometheus metrics...',
data: {
}
}
export const addPrometheusMetricsMiddlewaresIfEnabled = (logger: Logger, app: Express) => {

Check warning on line 32 in apps/server/src/apps/helpers/metrics/prometheus-metrics.ts

GitHub Actions / nest_lint

Missing return type on function
if (!PrometheusMetricsConfig.instance.isEnabled) {
logger.debug(
new PrometheusMetricsSetupStateLoggable(
);
};
export const createAndStartPrometheusMetricsAppIfEnabled = (logger: Logger) => {

Check warning on line 52 in apps/server/src/apps/helpers/metrics/prometheus-metrics.ts

GitHub Actions / nest_lint

Missing return type on function
if (!PrometheusMetricsConfig.instance.isEnabled) {
logger.debug(
new PrometheusMetricsSetupStateLoggable(PrometheusMetricsSetupState.FEATURE_DISABLED_APP_WILL_NOT_BE_CREATED)
this._collectMetricsRouteMetrics = Configuration.get('PROMETHEUS_METRICS_COLLECT_METRICS_ROUTE_METRICS') as boolean;
}
public static get instance() {

Check warning on line 44 in apps/server/src/apps/helpers/metrics/prometheus/config.ts

GitHub Actions / nest_lint

Public accessibility modifier on get property accessor instance

Check warning on line 44 in apps/server/src/apps/helpers/metrics/prometheus/config.ts

GitHub Actions / nest_lint

Missing return type on function
if (this._instance === undefined) {
this._instance = new this();
}