Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-8681 - replace nbc mail addresses #5438

Merged
merged 21 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
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
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
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
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"description": "Email address used for contacting"
},
"ACCESSIBILITY_REPORT_EMAIL": {
"type": "string",
"default": "[email protected]",
Expand Down
11 changes: 7 additions & 4 deletions test/services/helpdesk/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '[email protected]');
Configuration.set('SUPPORT_PROBLEM_EMAIL_ADDRESS', '[email protected]');
await helpdeskService.create(postBody, { account: { userId: '0000d213816abba584714c0a' } });
expect(mailService.create.firstArg.email).to.equal('[email protected]');
expect(mailService.create.firstArg.email).to.equal('[email protected]');
Configuration.set('SUPPORT_PROBLEM_EMAIL_ADDRESS', tempScTheme);
});

Expand Down Expand Up @@ -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', '[email protected],[email protected]');
Configuration.set(
'SUPPORT_WISH_EMAIL_ADDRESS',
'[email protected],[email protected]'
);
await helpdeskService.create(postBody, { account: { userId: '0000d213816abba584714c0a' } });
expect(mailService.create.args.length).to.equal(2);
expect(mailService.create.args[0][0].email).to.equal('[email protected]');
expect(mailService.create.args[0][0].email).to.equal('[email protected]');
expect(mailService.create.args[1][0].email).to.equal('[email protected]');
Configuration.set('SUPPORT_WISH_EMAIL_ADDRESS', tempScTheme);
});
Expand Down
Loading