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

Sync repo from v90 to v90 20231207094527 #95

Merged
merged 5 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f74589f7cc4a31610e8f718f67ae5ebe2cc6d714
24bc58a315ffbf05cdbe20b59700dae621f09343
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

## Change log

### December 7, 2023
- The branch v90 is now up to date with the 9.0 CU3 of Identity Manager.
- The repository has been updated with fixes for the following issues.
- 426872 Fixed a bug on policy violations incorrectly using standard justifications
- 426135 Fixed a bug on self registration of a new user configuration for new portal
- 415839 Security Fixes für imxweb 9.0 CU3 added
- 412932 Fixed a bug in parameter handling, which ignores query column settings

### April 24, 2023

- The branch `v90` is now up to date with the 9.0 CU2 of Identity Manager.
Expand Down
Binary file modified imxweb/imx-modules/imx-api-aad.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-aob.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-arc.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-att.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-cpl.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-dpr.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-hds.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-o3t.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-olg.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-pol.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-qbm.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-qer.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-rmb.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-rms.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-rps.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-tsb.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api-uci.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-api.tgz
Binary file not shown.
Binary file modified imxweb/imx-modules/imx-qbm-dbts.tgz
Binary file not shown.
909 changes: 579 additions & 330 deletions imxweb/package-lock.json

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions imxweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imxweb",
"version": "9.0.0",
"version": "9.0.3",
"scripts": {
"ng": "ng",
"start": "ng serve --configuration development",
Expand Down Expand Up @@ -41,6 +41,7 @@
"@angular/platform-browser": "^13.3.8",
"@angular/platform-browser-dynamic": "^13.3.8",
"@angular/router": "^13.3.8",
"@babel/traverse": "^7.23.2",
"@elemental-ui/cadence-icon": "file:imx-modules/elemental-ui_cadence-icon.tgz",
"@elemental-ui/core": "file:imx-modules/elemental-ui_core.tgz",
"@ngx-translate/core": "^11.0.1",
Expand All @@ -66,7 +67,7 @@
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.10",
"@angular-devkit/build-angular": "^13.3.11",
"@angular/cli": "^13.3.9",
"@angular/compiler-cli": "^13.3.8",
"@angular/language-service": "^13.3.8",
Expand Down Expand Up @@ -118,5 +119,8 @@
"imx-api-tsb": "file:imx-modules/imx-api-tsb.tgz",
"imx-api-uci": "file:imx-modules/imx-api-uci.tgz",
"imx-qbm-dbts": "file:imx-modules/imx-qbm-dbts.tgz"
},
"overrides": {
"@babel/traverse": "7.23.2"
}
}
2 changes: 1 addition & 1 deletion imxweb/projects/aad/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aad",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-aad"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/aob/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aob",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-aob"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/arc-app-certaccess/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arc-app-certaccess",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"peerDependencies": {

Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/att/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "att",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-att"
Expand Down
39 changes: 20 additions & 19 deletions imxweb/projects/att/src/lib/new-user/new-user.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { Router, Routes } from '@angular/router';
import { EuiCoreModule } from '@elemental-ui/core';
import { TranslateModule } from '@ngx-translate/core';
import { AuthConfigProvider, AuthenticationService, CaptchaModule, CdrModule, CustomAuthFlow, MastHeadModule, ParameterizedTextModule, UserMessageModule } from 'qbm';
import {
AuthConfigProvider,
AuthenticationService,
CaptchaModule,
CdrModule,
CustomAuthFlow,
MastHeadModule,
ParameterizedTextModule,
UserMessageModule,
ClassloggerService,
} from 'qbm';
import { ApiService } from '../api.service';
import { ConfirmDialogComponent } from './confirm-dialog.component';
import { NewUserComponent } from './new-user.component';
Expand All @@ -44,8 +54,8 @@ import { UserActivationComponent } from './user-activation.component';
const routes: Routes = [
{
path: 'useractivation',
component: UserActivationComponent
}
component: UserActivationComponent,
},
];

@NgModule({
Expand All @@ -63,49 +73,40 @@ const routes: Routes = [
ParameterizedTextModule,
UserMessageModule,
TranslateModule,
EuiCoreModule
],
declarations: [
OpenSidesheetComponent,
NewUserComponent,
UserActivationComponent,
ConfirmDialogComponent
EuiCoreModule,
],
declarations: [OpenSidesheetComponent, NewUserComponent, UserActivationComponent, ConfirmDialogComponent],
})
export class NewUserModule {
constructor(authService: AuthenticationService, router: Router, apiService: ApiService) {

constructor(authService: AuthenticationService, router: Router, apiService: ApiService, private readonly logger: ClassloggerService) {
const newUserAuthProvider: AuthConfigProvider = {
display: '#LDS#Create new account',
name: 'NewUser',
authProps: [],
customAuthFlow: new NewUserFlow()
customAuthFlow: new NewUserFlow(),
};

apiService.client.register_featureconfig_get().then(c => {
apiService.client.register_featureconfig_get().then((c) => {
if (c.SelfRegistrationEnabled) {
authService.registerAuthConfigProvider(newUserAuthProvider);
}
});


this.logger.info(this, '▶️ NewUser initialized');
this.addRoutes(router);
}

private addRoutes(router: Router): void {
const config = router.config;
routes.forEach(route => {
routes.forEach((route) => {
config.unshift(route);
});
router.resetConfig(config);
}

}

class NewUserFlow implements CustomAuthFlow {

public getEntryComponent() {
return OpenSidesheetComponent;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,9 @@ <h1 class="mat-headline">{{ '#LDS#Heading Confirm Email Address' | translate }}<
<mat-spinner *ngIf="busy"></mat-spinner>

<ng-container *ngIf="!busy">
<ng-container *ngIf="data">

<!-- ApprovalState meanings: 0=Certified, 1=New, 3=Denied-->
<eui-alert *ngIf="data.ApprovalState == 0">{{ldsAlreadyCompleted| translate}}</eui-alert>
<eui-alert *ngIf="data.ApprovalState == 1">{{ldsConfirmationText| translate}}</eui-alert>
<eui-alert *ngIf="data.ApprovalState == 3">{{ldsRegistrationDenied| translate}}</eui-alert>
</ng-container>

<eui-alert *ngIf="!data && missingCase && !hasProblems">{{ldsCompletionFailed| translate}}</eui-alert>
<eui-alert *ngIf="!data && !missingCase && !hasProblems">{{ldsResendEmail| translate}}</eui-alert>
<eui-alert *ngIf="!missingCase && hasProblems">{{ldsLoadingProblems| translate}}</eui-alert>


<eui-alert>{{ldsText| translate}}</eui-alert>
<div class="button-bar">
<button mat-raised-button *ngIf="!missingCase && !hasProblems" (click)="ReSendMail()">{{ldsSendAgain |
<button mat-raised-button *ngIf="hasFormat && !hasProblems" (click)="ReSendMail()">{{'#LDS#Send confirmation email again' |
translate}}
</button>

Expand All @@ -32,4 +20,4 @@ <h1 class="mat-headline">{{ '#LDS#Heading Confirm Email Address' | translate }}<
</button>
</div>
</ng-container>
</div>
</div>
84 changes: 57 additions & 27 deletions imxweb/projects/att/src/lib/new-user/user-activation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,28 @@
*
*/

import { Component, OnDestroy, OnInit } from '@angular/core';
import { Component, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { EuiLoadingService } from '@elemental-ui/core';
import { TranslateService } from '@ngx-translate/core';
import { PersonActivationDto } from 'imx-api-att';
import { AuthenticationService, SessionState, SnackBarService } from 'qbm';
import { AuthenticationService, SessionState, SnackBarService, SplashService } from 'qbm';
import { Subscription } from 'rxjs';
import { ApiService } from '../api.service';

@Component({
templateUrl: './user-activation.component.html',
styleUrls: ['./user-activation.component.scss']
styleUrls: ['./user-activation.component.scss'],
})
export class UserActivationComponent implements OnDestroy {

public missingCase = true;
public busy = true;
public data: PersonActivationDto;
public ldsConfirmationText = '#LDS#Confirm your email address and activate your account or send the confirmation email again (if the passcode has expired) by clicking one of the following buttons.';
public ldsAlreadyCompleted = '#LDS#You already have completed the registration process. Please log in with your credentials. If you have forgotten your credentials, ask your manager for a passcode.';
public ldsRegistrationDenied = '#LDS#Your registration was denied.';
public ldsCompletionFailed = '#LDS#The registration process could not be completed. The submitted registration process could not be found. You may already have completed the registration process. Please log in with your credentials. If you have forgotten your credentials, ask your manager for a passcode.';
public ldsResendEmail = '#LDS#The registration process could not be completed. Please click "Send confirmation email again" and follow the instructions in the new confirmation email.';
public ldsSendAgain = '#LDS#Send confirmation email again';
public ldsLoadingProblems = '#LDS#This attestation case has already been approved or denied.';
public hasProblems = false;
public ldsText: string;
public hasProblems = false;

private readonly subscription: Subscription;
private passcode: string;
private uidCase: string;

constructor(
private readonly attApiService: ApiService,
Expand All @@ -61,32 +54,35 @@ export class UserActivationComponent implements OnDestroy {
private readonly authService: AuthenticationService,
private readonly translateService: TranslateService,
private readonly busyService: EuiLoadingService,
private readonly splashService: SplashService,
private readonly router: Router
) {
this.subscription = route.queryParamMap.subscribe(async p => {
this.subscription = route.queryParamMap.subscribe(async (params) => {
this.busy = true;
try {
const uidCase = p.get('aeweb_UID_AttestationCase');
this.missingCase = !uidCase;
if (this.missingCase) {
this.uidCase = params.get('aeweb_UID_AttestationCase');
this.passcode = params.get('aeweb_PassCode');
if (!this.hasFormat) {
return;
}
this.passcode = p.get('aeweb_PassCode');
this.data = await this.attApiService.client.passwordreset_activation_init_post(uidCase);
this.data = await this.attApiService.client.passwordreset_activation_init_post(this.uidCase);

const preferredCulture = this.data.Culture;
if (preferredCulture) {
// apply preferred culture
this.useCulture(preferredCulture);
}
// Apply culture
this.data?.Culture ? this.useCulture(this.data.Culture) : null;
} catch {
this.hasProblems = true;
} finally {
this.determineText();
this.splashService.close();
this.busy = false;
}
});
}

public get hasFormat(): boolean {
return !!this.uidCase && !!this.passcode;
}

public ngOnDestroy(): void {
this.subscription?.unsubscribe();
}
Expand All @@ -96,8 +92,7 @@ export class UserActivationComponent implements OnDestroy {
try {
await this.attApiService.client.passwordreset_activation_resendemail_post();
this.snackbar.open({ key: '#LDS#An email has been sent to your specified email address.' }, '#LDS#Close');
}
catch {
} catch {
this.hasProblems = true;
} finally {
this.busyService.hide(overlayRef);
Expand All @@ -109,7 +104,7 @@ export class UserActivationComponent implements OnDestroy {
try {
await this.authService.processLogin(async () => {
const s = await this.attApiService.client.passwordreset_activation_confirm_post({
PassCode: this.passcode
PassCode: this.passcode,
});
return new SessionState(s);
});
Expand All @@ -122,6 +117,41 @@ export class UserActivationComponent implements OnDestroy {
}
}

private determineText(): void {
if (this.data) {
// We got a response from the server and can show the state of the case
switch (this.data.ApprovalState) {
case 0:
this.ldsText =
'#LDS#You already have completed the registration process. Please log in with your credentials. If you have forgotten your credentials, ask your manager for a passcode.';
break;
case 1:
this.ldsText =
'#LDS#Confirm your email address and activate your account or send the confirmation email again (if the passcode has expired) by clicking one of the following buttons.';
break;
// What happened to case 2?? Defined by the api and not here
case 3:
this.ldsText = '#LDS#Your registration was denied.';
break;
default:
this.ldsText =
'#LDS#The server returned a value we did not expect. Check with your manager to see what happened with your request.';
}
return;
}

// Here something went wrong and either the params were missing or the server failed
if (this.hasFormat && this.hasProblems) {
this.ldsText = '#LDS#This attestation case has already been approved or denied.';
} else if (this.hasFormat && !this.hasProblems) {
this.ldsText =
'#LDS#The registration process could not be completed. Please click "Send confirmation email again" and follow the instructions in the new confirmation email.';
} else if (!this.hasFormat && !this.hasProblems) {
this.ldsText =
'#LDS#The registration process could not be completed. The submitted registration process could not be found. You may already have completed the registration process. Please log in with your credentials. If you have forgotten your credentials, ask your manager for a passcode.';
}
}

private async useCulture(culture: string): Promise<void> {
this.translateService.setDefaultLang(culture);
await this.translateService.use(culture).toPromise();
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/cpl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cpl",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-cpl"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/dpr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dpr",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/hds/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hds",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-hds"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/o3t/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "o3t",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-o3t"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/olg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "olg",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-olg"
Expand Down
2 changes: 1 addition & 1 deletion imxweb/projects/pol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pol",
"version": "9.0.0",
"version": "9.0.3",
"private": true,
"bundledDependencies": [
"imx-api-pol"
Expand Down
Loading