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

N21-1493 Provision other group members #4582

Merged
merged 20 commits into from
Dec 1, 2023

Conversation

MarvinOehlerkingCap
Copy link
Contributor

@MarvinOehlerkingCap MarvinOehlerkingCap commented Nov 27, 2023

Description

Links to Tickets or other pull requests

https://ticketsystem.dbildungscloud.de/browse/N21-1493

Changes

Datasecurity

Deployment

New Repos, NPM pakages or vendor scripts

Approval for review

  • DEV: If api was changed - generate-client:server was executed in vue frontend and changes were tested and put in a PR with the same branch name.
  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

@arnegns arnegns self-requested a review November 28, 2023 14:00
@@ -446,9 +446,6 @@ describe('UserLoginMigrationController (API)', () => {
familienname: 'familienName',
vorname: 'vorname',
},
geschlecht: 'weiblich',
lokalisierung: 'not necessary',
vertrauensstufe: 'not necessary',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are throwing the validationErrorException we should extend the controller api for the migration endpoint. And i think a test would be useful for it

import { ErrorLogMessage } from '@src/core/logger/types';
import { ValidationError } from 'class-validator';

export class ValidationErrorLoggableException extends InternalServerErrorException implements Loggable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could give it to alex or post this new loggable in rc

@arnegns
Copy link
Contributor

arnegns commented Nov 29, 2023

Validation errors looks good for me:

[NestWinston] Error 2023-11-29 09:21:35.090 { type: 'VALIDATION_ERROR', stack: 'ValidationErrorLoggableException: Internal Server Error' + ' at SanisProvisioningStrategy.checkResponseValidation (/schulcloud-server/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.ts:92:10)' + ' at processTicksAndRejections (node:internal/process/task_queues:95:5)' + ' at SanisProvisioningStrategy.getData (/schulcloud-server/apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.ts:69:4)' + ' at ProvisioningService.getData (/schulcloud-server/apps/server/src/modules/provisioning/service/provisioning.service.ts:46:30)' + ' at OAuthService.provisionUser (/schulcloud-server/apps/server/src/modules/oauth/service/oauth.service.ts:61:30)' + ' at Oauth2Strategy.validate (/schulcloud-server/apps/server/src/modules/authentication/strategy/oauth2.strategy.ts:24:31)' + ' at Oauth2Strategy.callback [as _verify] (/schulcloud-server/node_modules/@nestjs/passport/dist/passport/passport.strategy.js:11:44)', data: { '0': 'An instance of SanisResponse has failed the validation:' + ' - property personenkontexte[0].gruppen[0].gruppe.id has failed the following constraints: id must be a string ' + ' - property personenkontexte[0].gruppen[1].gruppe.id has failed the following constraints: id must be a string ' + ' - property personenkontexte[0].gruppen[2].gruppe.id has failed the following constraints: id must be a string ' + ' - property personenkontexte[0].gruppen[3].gruppe.id has failed the following constraints: id must be a string ' }}

# Conflicts:
#	apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.spec.ts
#	apps/server/src/modules/provisioning/strategy/sanis/sanis.strategy.ts
#	apps/server/src/shared/testing/factory/external-group-dto.factory.ts
@@ -7,6 +7,7 @@ import { RoleName } from '@shared/domain/interface';
import { SystemProvisioningStrategy } from '@shared/domain/interface/system-provisioning.strategy';
import { legacySchoolDoFactory, userDoFactory } from '@shared/testing';
import { externalGroupDtoFactory } from '@shared/testing/factory/external-group-dto.factory';
import { externalSchoolDtoFactory } from '@shared/testing/factory/external-school-dto.factory';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these factories exported via barrel file?

Copy link

sonarqubecloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@MarvinOehlerkingCap MarvinOehlerkingCap merged commit 6103055 into main Dec 1, 2023
47 of 48 checks passed
@MarvinOehlerkingCap MarvinOehlerkingCap deleted the N21-1493-other-group-members branch December 1, 2023 15:02
bergatco pushed a commit that referenced this pull request Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants