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 Repository from 9.9.2024 #181

Merged
merged 4 commits into from
Sep 25, 2024
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 @@
d7376dc1bc7c9b8080948907c5bb14befb21039c
c2f226527c85033e5dd81f1ba2d4d90a4ced7e8b
1 change: 1 addition & 0 deletions .sync-history
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
31a43b96f 2024-08-23 Merged PR 70361: 271561-cdr-editor-for-bitmask-properties
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

## Change log

### September 9, 2024
- 463113: Fixes an issue, regarding the "Unsubscribed as from" property, that doesn't work as expected.
- 462249: Fixes the "Property not found: UID_UNSRoot" error, when switching to tab "Child System Entitlements" on the Data Explorer's system Entitlements page.
- 443363: Synchronizes the entity in case of an error.
- 460948:
- 457652 Fixes the missing notification, when request has a Valid From Date in the past and the approver opens the request in the future
- 463491: Fixes the information, that is displayed on _Pending Attestations > Policy violations of attestation case_.
- 271561: Added a CDR editor for bitmask properties.
- 456076: Fixes an issue, regarding the pre-assignment of the recipient via an URL parameter.
- 455439: Fixes an issue, regarding MFA related configuration parameters.
- 271561: Adds a new CDR editor for bitmask properties.
- 456427: Fixes the count for added items on the _Add To Cart_ snackbar message.
- 464618: Fixes an issue regarding custom filter on the manage shops page.

### August 12, 2024
- 459770: Fixed an issue where the request parameter validation result was not working on first input.
- 462048: Fixed an issue with delegation search caching.
Expand Down
Binary file modified imxweb/imx-modules/imx-api-qer.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,84 @@
<div class="alert-wrapper">
<eui-alert class="helper-alert" type="info" condensed="true" [colored]="true" [dismissable]="false">
<span>
{{'#LDS#Here you can get an overview of all policy violations of this attestation case.' | translate }}
{{ '#LDS#Here you can get an overview of all policy violations of this attestation case.' | translate }}
</span>
</eui-alert>
</div>
</div>
<mat-accordion multi="true" *ngIf="policyViolations.length > 1" class="imx-accordion" data-imx-identifier="decision-policy-violation-accordion">
<mat-expansion-panel *ngFor="let policyViolation of policyViolations; let isFirst = first" [expanded]="isFirst"
[attr.data-imx-identifier]="'decision-policy-violation-expansion-panel-'+policyViolation.DisplayObject">
<mat-expansion-panel-header>
<mat-panel-title>
<span>{{policyViolation.DisplayPolicy}}</span>
<eui-badge *ngIf="policyViolation.IsExceptionAllowed">
{{'#LDS#Exception allowed' | translate}}
</eui-badge>
<eui-badge color="orange" *ngIf="!policyViolation.IsExceptionAllowed">
{{'#LDS#Exception forbidden' | translate}}
</eui-badge>
</mat-panel-title>
</mat-expansion-panel-header>
<div>
<div class="imx-label">{{'#LDS#Affected object' | translate}}</div>
<div>{{policyViolation.DisplayObject}}</div>
</div>
<div class="imx-risk-reduction-container" *ngIf="mitigatingControlsPerViolation && policyViolation.MitigatingControls.length > 0; else noMitigatingControls">
<div class="imx-label">{{ '#LDS#The following mitigating controls are available for the policy violation:' | translate }}</div>
<ul class="imx-risk-reduction">
<li class="imx-risk-reduction-item" *ngFor="let control of policyViolation.MitigatingControls">
{{control.Display}}
</li>
</ul>
</div>
</mat-expansion-panel>
<mat-expansion-panel
*ngFor="let policyViolation of policyViolations; let isFirst = first"
[expanded]="isFirst"
[attr.data-imx-identifier]="'decision-policy-violation-expansion-panel-' + policyViolation.DisplayObject"
>
<mat-expansion-panel-header>
<mat-panel-title>
<span>{{ policyViolation.DisplayPolicy }}</span>
</mat-panel-title>
</mat-expansion-panel-header>
<div class="imx-margin-bottom-10">
<div class="imx-label">{{ '#LDS#Current state' | translate }}</div>
<eui-badge>
{{ stateDisplay(policyViolation) | translate }}
</eui-badge>
</div>
<div class="imx-margin-bottom-10">
<div class="imx-label">{{ '#LDS#Exception allowed' | translate }}</div>
<div>{{ (policyViolation.IsExceptionAllowed ? '#LDS#Yes' : '#LDS#No') | translate }}</div>
</div>
<div>
<div class="imx-label">{{ '#LDS#Affected object' | translate }}</div>
<div>{{ policyViolation.DisplayObject }}</div>
</div>
<div class="imx-risk-reduction-container" *ngIf="mitigatingControlsPerViolation && policyViolation.MitigatingControls.length > 0; else noMitigatingControls">
<div class="imx-label">{{ '#LDS#The following mitigating controls are available for the policy violation:' | translate }}</div>
<ul class="imx-risk-reduction">
<li class="imx-risk-reduction-item" *ngFor="let control of policyViolation.MitigatingControls">
{{ control.Display }}
</li>
</ul>
</div>
</mat-expansion-panel>
</mat-accordion>
<ng-container *ngIf="policyViolations.length === 1">
<ng-content *ngTemplateOutlet="singleView; context: { $implicit: policyViolations[0] }"></ng-content>
</ng-container>



<ng-template #singleView let-policyViolation>
<mat-card data-imx-identifier="decision-policy-violation-mat-card">
<mat-card-title>
<span>{{policyViolation.DisplayPolicy}}</span>
<eui-badge *ngIf="policyViolation.IsExceptionAllowed">
{{'#LDS#Exception allowed' | translate}}
</eui-badge>
<eui-badge color="orange" *ngIf="!policyViolation.IsExceptionAllowed">
{{'#LDS#Exception forbidden' | translate}}
<mat-card data-imx-identifier="decision-policy-violation-mat-card" class="imx-margin-card">
<mat-card-title>
<span>{{ policyViolation.DisplayPolicy }}</span>
</mat-card-title>
<div class="imx-margin-bottom-10">
<div class="imx-label">{{ '#LDS#Current state' | translate }}</div>
<eui-badge>
{{ stateDisplay(policyViolation) | translate }}
</eui-badge>
</mat-card-title>
<ng-container *ngIf="mitigatingControlsPerViolation;">
<div class="mat-expansion-panel-content">
<div class="imx-label">{{'#LDS#Affected object' | translate}}</div>
<div>{{policyViolation.DisplayObject}}</div>
</div>
<div class="imx-risk-reduction-container" *ngIf="policyViolation.MitigatingControls.length > 0; else noMitigatingControls">
<div class="imx-label">{{ '#LDS#The following mitigating controls are available for the policy violation:' | translate }}</div>
<ul class="imx-risk-reduction">
<li class="imx-risk-reduction-item" *ngFor="let control of policyViolation.MitigatingControls">
{{control.Display}}
</li>
</ul>
<div class="imx-margin-bottom-10">
<div class="imx-label">{{ '#LDS#Exception allowed' | translate }}</div>
<div>{{ (policyViolation.IsExceptionAllowed ? '#LDS#Yes' : '#LDS#No') | translate }}</div>
</div>
</ng-container>
</mat-card>
<div>
<div class="imx-label">{{ '#LDS#Affected object' | translate }}</div>
<div>{{ policyViolation.DisplayObject }}</div>
</div>
<ng-container *ngIf="mitigatingControlsPerViolation">
<div class="imx-risk-reduction-container" *ngIf="policyViolation.MitigatingControls.length > 0; else noMitigatingControls">
<div class="imx-label">{{ '#LDS#The following mitigating controls are available for the policy violation:' | translate }}</div>
<ul class="imx-risk-reduction">
<li class="imx-risk-reduction-item" *ngFor="let control of policyViolation.MitigatingControls">
{{ control.Display }}
</li>
</ul>
</div>
</ng-container>
</mat-card>
</ng-template>

<ng-template #noMitigatingControls>
<eui-alert class="imx-top-alert" [condensed]="true" [colored]="true" type="warning">
{{'#LDS#There are currently no mitigating controls assigned to the policy violation.' |translate}}
{{ '#LDS#There are currently no mitigating controls assigned to the policy violation.' | translate }}
</eui-alert>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
}
}

.eui-badge {
padding-left: 10px;
}

.imx-container > * {
margin-bottom: 10px;
}
Expand All @@ -69,3 +65,12 @@
margin: 1em 0;
}

.imx-margin-bottom-10 {
margin-bottom: 10px ;
}

.imx-margin-card {
margin-right: 3px;
margin-bottom: 3px;
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,27 @@
*/

import { Component, Input } from '@angular/core';
import { PolicyViolation } from 'imx-api-att';
import { PolicyViolation, ViolationState } from 'imx-api-att';

@Component({
selector: 'imx-decision-policy-violation',
templateUrl: './decision-policy-violation.component.html',
styleUrls: ['./decision-policy-violation.component.scss']
styleUrls: ['./decision-policy-violation.component.scss'],
})
export class DecisionPolicyViolationComponent {
@Input() public policyViolations: PolicyViolation[];
@Input() public mitigatingControlsPerViolation: boolean;

constructor() {}

public stateDisplay(violation: PolicyViolation) {
switch (violation.State) {
case ViolationState.ExceptionApproved:
return '#LDS#Exception granted';
case ViolationState.ExceptionDenied:
return '#LDS#Exception denied';
}

return '#LDS#Approval decision pending';
}
}
1 change: 1 addition & 0 deletions imxweb/projects/cpl/imx-plugin-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"qer-app-portal": [
{
"Container": "cpl",
"Condition": "COMPLIANCE",
"Name": "CplConfigModule"
}
]
Expand Down
5 changes: 5 additions & 0 deletions imxweb/projects/qbm/src/lib/cdr/cdr-editor.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface CdrEditor {
*/
control: AbstractControl;

/**
* Determines, if the control should only be validated after the value has been changed
*/
validateOnlyOnChange?: boolean;

/**
* An event, that is emitted, if the value of the cdr has changed.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export class CdrEditorComponent implements OnChanges {
*/
@Input() public cdr: ColumnDependentReference;

/**
* Determines, if the control should only be validated after the value has been changed
*/
@Input() public validateOnlyOnChange: boolean;

/**
* This is emitted, after the control is created properly.
* Only after this, the component can be added to a formGroup or FormArray.
Expand Down Expand Up @@ -130,6 +135,7 @@ export class CdrEditorComponent implements OnChanges {
this.controlCreated.emit(ref.instance.control);
this.elementRef.nativeElement.setAttribute('data-imx-identifier', `cdr-editor-${this.cdr.column.ColumnName}`);
this.editor = ref.instance;
this.editor.validateOnlyOnChange = this.validateOnlyOnChange;
} catch (e) {
this.logger.error(this, 'Failed to create editor for column dependent reference.', e);
}
Expand Down
9 changes: 5 additions & 4 deletions imxweb/projects/qbm/src/lib/cdr/cdr.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ import { TranslateModule } from '@ngx-translate/core';

import { EuiCoreModule } from '@elemental-ui/core';

import { CdrRegistryService } from './cdr-registry.service';
import { CdrEditorComponent } from './cdr-editor/cdr-editor.component';
import { CdrSidesheetComponent } from './cdr-sidesheet/cdr-sidesheet.component';
import { DateRangeComponent } from './date-range/date-range.component';
import { EditBinaryComponent } from './edit-binary/edit-binary.component';
import { EditBitmaskComponent } from './edit-bitmask/edit-bitmask.component';
import { EditBooleanComponent } from './edit-boolean/edit-boolean.component';
import { EditDefaultComponent } from './edit-default/edit-default.component';
import { EditMultilineComponent } from './edit-multiline/edit-multiline.component';
import { EditNumberComponent } from './edit-number/edit-number.component';
import { EditLimitedValueComponent } from './edit-limited-value/edit-limited-value.component';
import { EditMultiValueComponent } from './edit-multi-value/edit-multi-value.component';
import { EditMultiLimitedValueComponent } from './edit-multi-limited-value/edit-multi-limited-value.component';
import { EditBinaryComponent } from './edit-binary/edit-binary.component';
import { EditDateComponent } from './edit-date/edit-date.component';
import { PropertyViewerComponent } from './property-viewer/property-viewer.component';
import { DisableControlModule } from '../disable-control/disable-control.module';
Expand All @@ -71,11 +73,9 @@ import { ScrollingModule } from '@angular/cdk/scrolling';
import { FkHierarchicalDialogModule } from '../fk-hierarchical-dialog/fk-hierarchical-dialog.module';
import { ViewPropertyComponent } from './view-property/view-property.component';
import { DateModule } from '../date/date.module';
import { DateRangeComponent } from './date-range/date-range.component';
import { ImageModule } from '../image/image.module';
import { EntityColumnEditorComponent } from './entity-column-editor/entity-column-editor.component';
import { EditUrlComponent } from './edit-url/edit-url.component';
import { CdrSidesheetComponent } from './cdr-sidesheet/cdr-sidesheet.component';
import { MatCardModule } from '@angular/material/card';
import { MatTooltipModule } from '@angular/material/tooltip';
import { InfoModalDialogModule } from '../info-modal-dialog/info-modal-dialog.module';
Expand All @@ -91,6 +91,7 @@ import { InfoModalDialogModule } from '../info-modal-dialog/info-modal-dialog.mo
EditMultiValueComponent,
EditMultiLimitedValueComponent,
EditBinaryComponent,
EditBitmaskComponent,
EditDateComponent,
PropertyViewerComponent,
EditImageComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { EditMultiValueComponent } from './edit-multi-value/edit-multi-value.com
import { EditMultilineComponent } from './edit-multiline/edit-multiline.component';
import { EditImageComponent } from './edit-image/edit-image.component';
import { EditDateComponent } from './edit-date/edit-date.component';
import { EditBitmaskComponent } from './edit-bitmask/edit-bitmask.component';
import { EditRiskIndexComponent } from './edit-risk-index/edit-risk-index.component';
import { DateRangeComponent } from './date-range/date-range.component';
import { EditUrlComponent } from './edit-url/edit-url.component';
Expand Down Expand Up @@ -76,6 +77,10 @@ export class DefaultCdrEditorProvider implements CdrEditorProvider {
return this.createBound(EditImageComponent, parent, cdref);
}

if (type === ValType.Int && meta.GetBitMaskCaptions()?.length > 0) {
return this.createBound(EditBitmaskComponent, parent, cdref);
}

if (!multiLine && !multiValue && !range && !limitedValues && !isRiskIndexColumn) {
switch (type) {
case ValType.Bool:
Expand Down Expand Up @@ -122,7 +127,7 @@ export class DefaultCdrEditorProvider implements CdrEditorProvider {
private createBound<T extends CdrEditor>(
editor: Type<T>,
parent: ViewContainerRef,
cdref: ColumnDependentReference
cdref: ColumnDependentReference,
): ComponentRef<CdrEditor> {
const result = parent.createComponent(editor);
result.instance.bind(cdref);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<ng-container *ngIf="columnContainer?.canEdit; else isReadonly">
<eui-select class="imx-bitmask-select" [label]="columnContainer?.display || '' | translate"
[placeholder]="'#LDS#Select' | translate" [multiple]="true" [options]="options" [formControl]="control">
</eui-select>
</ng-container>

<ng-template #isReadonly>
<imx-view-property [columnContainer]="columnContainer" defaultValue="#LDS#Not set"> </imx-view-property>
</ng-template>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// add styles if necessary
Loading
Loading