Skip to content

Commit

Permalink
Automated sync from source branch v92 (#83)
Browse files Browse the repository at this point in the history
Update to v92 GA build
---------

Co-authored-by: imx-sync-bot <imx-sync-bot@oneidentity>
Co-authored-by: Hanno Bunjes <[email protected]>
  • Loading branch information
3 people authored Oct 20, 2023
1 parent 573dc5c commit 2a760ab
Show file tree
Hide file tree
Showing 100 changed files with 1,073 additions and 472 deletions.
2 changes: 1 addition & 1 deletion .commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f441fc015e629f5e8987c3163af6a85af6293484
d0e5493b4e0f1ce5d3d1a9a84202243999a67791
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## Change log

### October 20, 2023

- The repository has been updated with the source code for the Identity Manager 9.2 release in the `v92` branch.
For information about new features and enhancements in this version, please refer to the Identity Manager 9.2 Release Notes.

### October 15, 2022

- There is a new application in the workspace called `custom-app`. This application is a template that provides the basic building blocks (such as Material integration, session handling, login, and the API client configuration) can be used as a starting point for building new applications. See [`readme.md`](./imxweb/projects/custom-app/readme.md) for more information.
Expand Down Expand Up @@ -34,6 +39,8 @@ This repository contains the source code for the HTML5 applications contained in

It is a monorepo containing the Angular [workspace](https://angular.io/guide/workspace-config), which consists of apps and [libraries](https://angular.io/guide/libraries).

We strongly recommend to read the [HTML Development Guide](https://support.oneidentity.com/technical-documents/identity-manager/9.2/html5-development-guide) before starting to work with the code in this repository.

By forking this repository, you may create customized versions of the projects and add them to your Identity Manager deployment.

## Workspace overview
Expand All @@ -60,9 +67,9 @@ Each Angular library and app belongs to a folder in the `projects` directory. Th
|`olg`|Angular plugin library|`qbm`, `qer`|
|`pol`|Angular plugin library|`qbm`, `qer`|

Each Angular library belongs to the Identity Manager module of the same name.
Each Angular library belongs to the Identity Manager module of the same name. You do not need to build Angular libraries for modules that are not part of your Identity Manager installation.

A (non-plugin) library acts like a regular compile-time dependency. A _plugin_ library is loaded dynamically at runtime, as determined by the plugins' `imx-plugin-config.json` files.
A (non-plugin) library acts like a regular compile-time dependency. A _plugin_ library is loaded dynamically at runtime, as determined by each plugin's `imx-plugin-config.json` file.

For more information about each project, see the `readme.md` files in each project's folder.

Expand All @@ -76,9 +83,9 @@ For more information about each project, see the `readme.md` files in each proje
|`qer-app-pwdportal`|Password Reset Portal|Angular app|`qbm`, `qer`|
|`custom-app`|Template for custom applications|Angular app|`qbm`|

## Installing node.js
## Installing Node.js

Verify that you have installed the correct `node.js` version for your branch. The version used by the CI build is defined in the [`.github/workflows/npm-build.yml`](.github/workflows/npm-build.yml) file in the `node-version` property. Other versions of `node.js`, including newer versions, are not guaranteed to be compatible with other Angular versions.
Verify that you have installed a compatible `node.js` version for your branch. The version used by the CI build is defined in the [`.github/workflows/npm-build.yml`](.github/workflows/npm-build.yml) file in the `node-version` property. Other versions of `node.js`, including newer versions, are not guaranteed to be compatible with other Angular versions. Please see the [version compatibility table](https://angular.io/guide/versions) on the official Angular site.

## Building

Expand Down Expand Up @@ -107,23 +114,31 @@ imxclient.exe run-apiserver -B

The web apps will connect to the API Server using the URL defined in the application's `environment.ts` file. The default setting is `http://localhost:8182` which is the default URL that a local API Server will run on.

## More information
## Getting started

Please refer to the [HTML Development Guide](https://support.oneidentity.com/technical-documents/identity-manager/8.2.1/html5-development-guide#TOPIC-1801966) for step-by-step instructions on getting started.

## Branches and Update Policy

The following table shows the branches in this repository corresponding to each product version.

|Branch|Product version|`node.js` version|
|Branch|Product version|Angular version|
|-|-|-|
|`v91`|Identity Manager 9.1.x|14|
|`v90`|Identity Manager 9.0|14|
|`v82`|Identity Manager 8.2.x|14|
|`v92`|Identity Manager 9.2.x|14|
|`v91`|Identity Manager 9.1.x|13|
|`v90`|Identity Manager 9.0|13|
|`v82`|Identity Manager 8.2.x|11|
|`master`|The `master` branch does not correspond to a supported version of Identity Manager. Do not use this branch for development purposes.||

Please also see the [version compatibility table](https://angular.io/guide/versions).

We plan to push updates for each minor and major product release, allowing developers to track source code changes from one version to the next. Occasionally we may also publish important bug fixes.

## Step-by-step guides

- [Theming guide](./imxweb/custom-theme/readme.md)
- [CDR guide](./imxweb/projects/qbm/src/lib/cdr/Readme.md)

## Contributing

We welcome and appreciate contributions. Here's how you can open a pull request to submit code changes.
Expand Down
42 changes: 41 additions & 1 deletion imxweb/custom-theme/readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
Run "npm run build" to compile the SASS file to a CSS file.
# Theming the application

The HTML5 applications support the integration of **custom themes**. Before proceeding, we recommend that you read the [Angular Material Theming](https://material.angular.io/guide/theming) guide.

## Compiling a custom theme

- Change the variables in the file [custom-theme.scss](./custom-theme.scss) as required:
- `$font-family`
- `$primary`
- `$accent`
- `$warn`
- Rename the `.custom-theme` class to your theme's name. (e.g. `.space-theme`)
- In a terminal, change to the `imxweb/custom-theme` folder and run the `npm run build` command
- Take the `custom-theme.css` file and create a .zip file. The naming convention is to use `Html_<ThemeName>.zip` (for example `Html_space-theme.zip`).
- Copy the .zip file to the `imxweb` folder.
- Create a folder inside the `imxweb` folder with the name of your .zip file (e.g. `Html_space-theme`).
- Create a `imx-theme-config.json` file inside in this folder. Use this text as a content template, filling in the correct values for your theme.
- `Name`: a unique name and identifier of the theme
- `DisplayName`: a user friendly name for display purposes
- `Class`: the CSS class identifier which is used for theming (e.g. `eui-light-theme` in default)
- `Urls`: a list of all relevant files for this theme (also pictures, icons or other resources which are referenced if required)

``` json
{
"Themes": [
{
"Name": "space-theme",
"Display Name": "Space Theme",
"Class": "space-theme",
"Urls": [
"../space-theme/custom-theme.css"
]
}
]
}
```
- Upload the .zip file and the `imx-theme-config.json` file with Software Loader like you would with an Angular plugin.
- Restart your API server.
- Login to Web Portal > Click on your username > Select "User Interface Settings" > Change the application's theme to your custom theme.

*Note*: Multiple theme definition files are possible. Multiple themes can also be declared inside one theme `imx-theme-config.json` file, however every theme needs to be provided as single .zip file.
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-apc.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-o3e.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-sac.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.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</mat-card>

<mat-card *ngIf="!hasSampleData" class="imx-cases-card">
<imx-data-source-toolbar #dst [settings]="dstSettings" [options]="['settings']" (navigationStateChanged)="onNavigationStateChanged($event)"> </imx-data-source-toolbar>
<imx-data-source-toolbar #dst [settings]="dstSettings" [options]="['settings']" [disableFilterWizard]="true" (navigationStateChanged)="onNavigationStateChanged($event)"> </imx-data-source-toolbar>

<imx-data-table [dst]="dst" detailViewVisible="false" mode="manual" [selectable]="data.canCreateRuns" (selectionChanged)="onSelectionChanged($event)">
<imx-data-table-column [entityColumn]="entitySchemaPolicy?.Columns[DisplayColumns.DISPLAY_PROPERTYNAME]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { EuiLoadingService, EuiSidesheetRef, EUI_SIDESHEET_DATA } from '@element
import { TranslateService } from '@ngx-translate/core';

import { PortalAttestationFilterMatchingobjects } from 'imx-api-att';
import { CollectionLoadParameters, IClientProperty, DisplayColumns, ValType, EntitySchema, DataModel } from 'imx-qbm-dbts';
import { CollectionLoadParameters, DisplayColumns, ValType, EntitySchema } from 'imx-qbm-dbts';
import { ClassloggerService, ClientPropertyForTableColumns, ConfirmationService, DataSourceToolbarSettings, LdsReplacePipe, SettingsService, SnackBarService } from 'qbm';
import { PolicyService } from '../policy.service';
import { AttestationCasesComponentParameter } from './attestation-cases-component-parameter.interface';
Expand All @@ -50,7 +50,6 @@ export class AttestationCasesComponent implements OnInit {

private navigationState: CollectionLoadParameters;
private displayedColumns: ClientPropertyForTableColumns[];
private dataModel: DataModel;
private threshold = -1;

constructor(
Expand Down Expand Up @@ -86,7 +85,6 @@ export class AttestationCasesComponent implements OnInit {
let overlayRef: OverlayRef;
setTimeout(() => (overlayRef = this.busyService.show()));
try {
this.dataModel = await this.policyService.getDataModel();
this.threshold = await this.policyService.getCasesThreshold();
} finally {
setTimeout(async () => {
Expand Down Expand Up @@ -161,8 +159,7 @@ export class AttestationCasesComponent implements OnInit {
displayedColumns: this.displayedColumns,
dataSource: datasource,
entitySchema: this.entitySchemaPolicy,
navigationState: this.navigationState,
dataModel: this.dataModel
navigationState: this.navigationState
};

this.logger.debug(this, 'matching objects table navigated to', this.navigationState);
Expand Down
3 changes: 2 additions & 1 deletion imxweb/projects/cpl/src/lib/cpl-config.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { RulesViolationsModule } from './rules-violations/rules-violations.modul
import { RulesViolationsComponent } from './rules-violations/rules-violations.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ComplianceRulesGuardService } from './guards/compliance-rules-guard.service';
import { RuleViolationsGuardService } from './guards/rule-violations-guard.service';
import { MatCardModule } from '@angular/material/card';
import { RequestModule} from './request/request.module';
const routes: Routes = [
Expand All @@ -63,7 +64,7 @@ const routes: Routes = [
{
path: 'compliance/rulesviolations/approve',
component: RulesViolationsComponent,
canActivate: [RouteGuardService, ComplianceRulesGuardService],
canActivate: [RouteGuardService, RuleViolationsGuardService],
resolve: [RouteGuardService],
data:{
contextId: HELP_CONTEXTUAL.ComplianceRulesViolationsApprove
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<imx-badge-tile data-imx-identifier="cpl-dashboard--plugin-badge-tile-violations-approvals"
[caption]="'#LDS#Heading Pending Rule Violations' | translate" *ngIf="0 < pendingItems?.OpenNonCompliance"
[caption]="'#LDS#Heading Pending Rule Violations' | translate" *ngIf="isExceptionAdmin && 0 < pendingItems?.OpenNonCompliance"
[value]="pendingItems?.OpenNonCompliance" [identifier]="'cpl-rule-violation-approvals'"
(actionClick)="router.navigate(['compliance', 'rulesviolations', 'approve'])">
</imx-badge-tile>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

import { DashboardService, PendingItemsType, UserModelService } from 'qer';
import { CplPermissionsService } from '../rules/admin/cpl-permissions.service';

@Component({
templateUrl: './dashboard-plugin.component.html'
Expand All @@ -36,9 +37,12 @@ export class DashboardPluginComponent implements OnInit {

public pendingItems: PendingItemsType;

public isExceptionAdmin = false;

constructor(
public readonly router: Router,
private readonly dashboardService: DashboardService,
private readonly permissionService: CplPermissionsService,
private readonly userModelSvc: UserModelService
) { }

Expand All @@ -47,7 +51,10 @@ export class DashboardPluginComponent implements OnInit {
const busy = this.dashboardService.beginBusy();

try {
this.pendingItems = await this.userModelSvc.getPendingItems();
this.isExceptionAdmin = await this.permissionService.isExceptionAdmin();
if (this.isExceptionAdmin) {
this.pendingItems = await this.userModelSvc.getPendingItems();
}
} finally {
busy.endBusy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { Injectable } from '@angular/core';
import { CanActivate, Router } from '@angular/router';

import { AppConfigService } from 'qbm';
import { QerPermissionsService } from 'qer';
import { CplPermissionsService } from '../rules/admin/cpl-permissions.service';

@Injectable({
Expand All @@ -37,7 +36,6 @@ import { CplPermissionsService } from '../rules/admin/cpl-permissions.service';
export class ComplianceRulesGuardService implements CanActivate {
constructor(
private readonly permissionService: CplPermissionsService,
private readonly permissionsQer: QerPermissionsService,
private readonly appConfig: AppConfigService,
private readonly router: Router
) { }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* ONE IDENTITY LLC. PROPRIETARY INFORMATION
*
* This software is confidential. One Identity, LLC. or one of its affiliates or
* subsidiaries, has supplied this software to you under terms of a
* license agreement, nondisclosure agreement or both.
*
* You may not copy, disclose, or use this software except in accordance with
* those terms.
*
*
* Copyright 2023 One Identity LLC.
* ALL RIGHTS RESERVED.
*
* ONE IDENTITY LLC. MAKES NO REPRESENTATIONS OR
* WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR
* NON-INFRINGEMENT. ONE IDENTITY LLC. SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
* THIS SOFTWARE OR ITS DERIVATIVES.
*
*/

import { Injectable } from '@angular/core';
import { CanActivate, Router } from '@angular/router';

import { AppConfigService } from 'qbm';
import { CplPermissionsService } from '../rules/admin/cpl-permissions.service';

@Injectable({
providedIn: 'root',
})
export class RuleViolationsGuardService implements CanActivate {
constructor(
private readonly permissionService: CplPermissionsService,
private readonly appConfig: AppConfigService,
private readonly router: Router
) { }

public async canActivate(): Promise<boolean> {
const isExceptionAdmin = await this.permissionService.isExceptionAdmin();
if (!isExceptionAdmin) {
this.router.navigate([this.appConfig.Config.routeConfig.start], { queryParams: {} });
return false;
}
return isExceptionAdmin;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { TranslateService } from '@ngx-translate/core';

import { CollectionLoadParameters, EntitySchema, TypedEntity, ValType } from 'imx-qbm-dbts';
import { ActivatedRoute, Params } from '@angular/router';
import { OverlayRef } from '@angular/cdk/overlay';

import {
ClassloggerService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatCardModule } from '@angular/material/card';
import { RouterModule, Routes } from '@angular/router';
import { EuiCoreModule, EuiMaterialModule } from '@elemental-ui/core';
import { TranslateModule } from '@ngx-translate/core';

Expand All @@ -41,7 +40,6 @@ import {
ExtModule,
MenuItem,
MenuService,
RouteGuardService,
SelectedElementsModule
} from 'qbm';
import { RulesViolationsComponent } from './rules-violations.component';
Expand All @@ -52,10 +50,11 @@ import { RulesViolationsMultiActionComponent } from './rules-violations-action/r
import { RulesViolationsSingleActionComponent } from './rules-violations-action/rules-violations-single-action/rules-violations-single-action.component';
import { ResolveComponent } from './resolve/resolve.component';
import { MatStepperModule } from '@angular/material/stepper';
import { isRuleStatistics } from '../rules/admin/permissions-helper';
import { isExceptionAdmin } from '../rules/admin/permissions-helper';
import { MitigatingControlsPersonComponent } from './mitigating-controls-person/mitigating-controls-person.component';
import { MatExpansionModule } from '@angular/material/expansion';
import { MitigatingControlContainerModule } from '../mitigating-control-container/mitigating-control-container.module';
import { ProjectConfig } from 'imx-api-qer';


@NgModule({
Expand Down Expand Up @@ -102,11 +101,11 @@ export class RulesViolationsModule {

private setupMenu(): void {
this.menuService.addMenuFactories(
(preProps: string[], features: string[]) => {
(preProps: string[], features: string[], projectConfig: ProjectConfig, groups: string[]) => {

const items: MenuItem[] = [];

if (preProps.includes('ITSHOP') && isRuleStatistics(features)) {
if (preProps.includes('ITSHOP') && isExceptionAdmin(groups)) {
items.push(
{
id: 'CPL_Compliance_RulesViolations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,18 @@
import { Injectable } from '@angular/core';

import { UserModelService } from 'qer';
import { isRuleStatistics } from './permissions-helper';
import { isExceptionAdmin, isRuleStatistics } from './permissions-helper';

@Injectable({
providedIn: 'root'
})
export class CplPermissionsService {
constructor(private readonly userService: UserModelService) { }

public async isExceptionAdmin(): Promise<boolean> {
return isExceptionAdmin((await this.userService.getGroups()).map(group => group.Name));
}

public async isRuleStatistics(): Promise<boolean> {
return isRuleStatistics((await this.userService.getFeatures()).Features);
}
Expand Down
4 changes: 4 additions & 0 deletions imxweb/projects/cpl/src/lib/rules/admin/permissions-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
*/


export function isExceptionAdmin(groups: string[]): boolean {
return groups.find(item => item === 'vi_4_RULEADMIN_EXCEPTION') != null;
}

export function isRuleStatistics(features: string[]): boolean {
return features.find(item => item === 'Portal_UI_RuleStatistics') != null;
}
Loading

0 comments on commit 2a760ab

Please sign in to comment.