WEB-601 Create env var for hidding client data information (#3010)
This commit is contained in:
@@ -281,11 +281,12 @@ Available languages:
|
|||||||
|
|
||||||
#### UI Display Settings
|
#### UI Display Settings
|
||||||
|
|
||||||
| Variable | Description | Default Value |
|
| Variable | Description | Default Value |
|
||||||
| ---------------------------------- | ------------------------------------- | ------------- |
|
| ---------------------------------- | -------------------------------------- | ------------- |
|
||||||
| MIFOS_DISPLAY_TENANT_SELECTOR | Display tenant selector in Login view | true |
|
| MIFOS_DISPLAY_TENANT_SELECTOR | Display tenant selector in Login view | true |
|
||||||
| MIFOS_DISPLAY_BACKEND_INFO | Display backend info in footer | true |
|
| MIFOS_DISPLAY_BACKEND_INFO | Display backend info in footer | true |
|
||||||
| MIFOS_ALLOW_SERVER_SWITCH_SELECTOR | Display DNS server list | true |
|
| MIFOS_ALLOW_SERVER_SWITCH_SELECTOR | Display DNS server list | true |
|
||||||
|
| MIFOS_COMPLIANCE_HIDE_CLIENT_DATA | Hide client names in UI (mask with \*) | false |
|
||||||
|
|
||||||
#### OAUTH Settings
|
#### OAUTH Settings
|
||||||
|
|
||||||
@@ -307,6 +308,20 @@ Available languages:
|
|||||||
|
|
||||||
For more detailed configuration options, refer to the `env.sample` file in the root directory of the project.
|
For more detailed configuration options, refer to the `env.sample` file in the root directory of the project.
|
||||||
|
|
||||||
|
### Client Data Masking Example
|
||||||
|
|
||||||
|
When `MIFOS_COMPLIANCE_HIDE_CLIENT_DATA=false` (default):
|
||||||
|
|
||||||
|
EMANUEL CASTILLO
|
||||||
|
MIGUEL TECO
|
||||||
|
|
||||||
|
When `MIFOS_COMPLIANCE_HIDE_CLIENT_DATA=true`:
|
||||||
|
|
||||||
|
E**\*** C**\*\*\***
|
||||||
|
M**\*** T\*\*\*
|
||||||
|
|
||||||
|
This applies to client name display, e.g. in Institution/Clients list.
|
||||||
|
|
||||||
## Releases
|
## Releases
|
||||||
|
|
||||||
### 1.0.0 (Tag: 1.0.0-fineract1.11)
|
### 1.0.0 (Tag: 1.0.0-fineract1.11)
|
||||||
|
|||||||
@@ -38,3 +38,6 @@ MIFOS_OAUTH_CLIENT_ID=web-app
|
|||||||
|
|
||||||
#Enable or Disable HTTP Cache
|
#Enable or Disable HTTP Cache
|
||||||
MIFOS_HTTP_CACHE_ENABLED=true
|
MIFOS_HTTP_CACHE_ENABLED=true
|
||||||
|
|
||||||
|
# Hide client data information (set to true to mask client names)
|
||||||
|
MIFOS_COMPLIANCE_HIDE_CLIENT_DATA=false
|
||||||
|
|||||||
@@ -50,7 +50,9 @@
|
|||||||
<!-- Name Column -->
|
<!-- Name Column -->
|
||||||
<ng-container matColumnDef="displayName">
|
<ng-container matColumnDef="displayName">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
|
||||||
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']">{{ row.displayName }}</td>
|
<td mat-cell *matCellDef="let row" [routerLink]="[row.id, 'general']">
|
||||||
|
{{ hideClientData ? maskName(row.displayName) : row.displayName }}
|
||||||
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Account no Column -->
|
<!-- Account no Column -->
|
||||||
|
|||||||
@@ -67,6 +67,20 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
|||||||
export class ClientsComponent implements OnInit {
|
export class ClientsComponent implements OnInit {
|
||||||
private clientService = inject(ClientsService);
|
private clientService = inject(ClientsService);
|
||||||
|
|
||||||
|
/** Returns true if client data masking is enabled */
|
||||||
|
get hideClientData(): boolean {
|
||||||
|
return environment.complianceHideClientData;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Mask a client name */
|
||||||
|
maskName(name: string): string {
|
||||||
|
if (!name) return '';
|
||||||
|
return name
|
||||||
|
.split(' ')
|
||||||
|
.map((part) => (part.length > 1 ? part[0] + '*'.repeat(part.length - 1) : part))
|
||||||
|
.join(' ');
|
||||||
|
}
|
||||||
|
|
||||||
@ViewChild('showClosedAccounts') showClosedAccounts: MatCheckbox;
|
@ViewChild('showClosedAccounts') showClosedAccounts: MatCheckbox;
|
||||||
|
|
||||||
displayedColumns = [
|
displayedColumns = [
|
||||||
|
|||||||
@@ -58,6 +58,10 @@
|
|||||||
// OAuth Client Id
|
// OAuth Client Id
|
||||||
window['env']['oauthAppId'] = '';
|
window['env']['oauthAppId'] = '';
|
||||||
|
|
||||||
|
|
||||||
|
// Hide client data (mask names)
|
||||||
|
window['env']['complianceHideClientData'] = '';
|
||||||
|
|
||||||
// OIDC Plugin Environment variables
|
// OIDC Plugin Environment variables
|
||||||
window['env']['oidcServerEnabled'] = false;
|
window['env']['oidcServerEnabled'] = false;
|
||||||
window['env']['oidcBaseUrl'] = '';
|
window['env']['oidcBaseUrl'] = '';
|
||||||
|
|||||||
@@ -72,6 +72,9 @@
|
|||||||
// Enable or Disable HTTP Cache
|
// Enable or Disable HTTP Cache
|
||||||
window['env']['httpCacheEnabled'] = '$MIFOS_HTTP_CACHE_ENABLED';
|
window['env']['httpCacheEnabled'] = '$MIFOS_HTTP_CACHE_ENABLED';
|
||||||
|
|
||||||
|
// Hide client data (mask names)
|
||||||
|
window['env']['complianceHideClientData'] = '$MIFOS_COMPLIANCE_HIDE_CLIENT_DATA';
|
||||||
|
|
||||||
window['env']['vNextApiUrl'] = '$VNEXT_API_URL';
|
window['env']['vNextApiUrl'] = '$VNEXT_API_URL';
|
||||||
window['env']['vNextApiProvider'] = '$VNEXT_API_PROVIDER';
|
window['env']['vNextApiProvider'] = '$VNEXT_API_PROVIDER';
|
||||||
window['env']['vNextApiVersion'] = '$VNEXT_API_VERSION';
|
window['env']['vNextApiVersion'] = '$VNEXT_API_VERSION';
|
||||||
|
|||||||
@@ -80,6 +80,13 @@ export const environment = {
|
|||||||
|
|
||||||
minPasswordLength: loadedEnv['minPasswordLength'] || 12,
|
minPasswordLength: loadedEnv['minPasswordLength'] || 12,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide client data information (mask client names with *)
|
||||||
|
* Set via MIFOS_COMPLIANCE_HIDE_CLIENT_DATA env var
|
||||||
|
*/
|
||||||
|
complianceHideClientData:
|
||||||
|
loadedEnv['complianceHideClientData'] === 'true' || loadedEnv['complianceHideClientData'] === true || false,
|
||||||
|
|
||||||
OIDC: {
|
OIDC: {
|
||||||
// Support legacy FINERACT_PLUGIN_OIDC_* variable names for backward compatibility
|
// Support legacy FINERACT_PLUGIN_OIDC_* variable names for backward compatibility
|
||||||
oidcServerEnabled:
|
oidcServerEnabled:
|
||||||
|
|||||||
@@ -84,6 +84,13 @@ export const environment = {
|
|||||||
|
|
||||||
minPasswordLength: loadedEnv.minPasswordLength || 12,
|
minPasswordLength: loadedEnv.minPasswordLength || 12,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide client data information (mask client names with *)
|
||||||
|
* Set via MIFOS_COMPLIANCE_HIDE_CLIENT_DATA env var
|
||||||
|
*/
|
||||||
|
complianceHideClientData:
|
||||||
|
loadedEnv.complianceHideClientData === 'true' || loadedEnv.complianceHideClientData === true || false,
|
||||||
|
|
||||||
OIDC: {
|
OIDC: {
|
||||||
// Support legacy FINERACT_PLUGIN_OIDC_* variable names for backward compatibility
|
// Support legacy FINERACT_PLUGIN_OIDC_* variable names for backward compatibility
|
||||||
oidcServerEnabled:
|
oidcServerEnabled:
|
||||||
|
|||||||
Reference in New Issue
Block a user