diff --git a/apps/red-ui/src/app/app-config/app-config.service.ts b/apps/red-ui/src/app/app-config/app-config.service.ts index f91da2f9d..f3c14b043 100644 --- a/apps/red-ui/src/app/app-config/app-config.service.ts +++ b/apps/red-ui/src/app/app-config/app-config.service.ts @@ -8,7 +8,9 @@ export enum AppConfigKey { OAUTH_URL = "OAUTH_URL", OAUTH_CLIENT_ID = "OAUTH_CLIENT_ID", API_URL = "API_URL", - PDFTRON_LICENSE ="PDFTRON_LICENSE" + PDFTRON_LICENSE ="PDFTRON_LICENSE", + ADMIN_CONTACT_NAME="ADMIN_CONTACT_NAME", + ADMIN_CONTACT_URL="ADMIN_CONTACT_URL", } @Injectable({ diff --git a/apps/red-ui/src/app/screens/auth-error/auth-error.component.html b/apps/red-ui/src/app/screens/auth-error/auth-error.component.html index d0dd895e7..8a127631f 100644 --- a/apps/red-ui/src/app/screens/auth-error/auth-error.component.html +++ b/apps/red-ui/src/app/screens/auth-error/auth-error.component.html @@ -1,4 +1,12 @@
-

- +

+

+

+

+
diff --git a/apps/red-ui/src/app/screens/auth-error/auth-error.component.ts b/apps/red-ui/src/app/screens/auth-error/auth-error.component.ts index b523af973..b737da561 100644 --- a/apps/red-ui/src/app/screens/auth-error/auth-error.component.ts +++ b/apps/red-ui/src/app/screens/auth-error/auth-error.component.ts @@ -1,5 +1,6 @@ -import { Component, OnInit } from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import {UserService} from "../../user/user.service"; +import {AppConfigKey, AppConfigService} from "../../app-config/app-config.service"; @Component({ selector: 'redaction-auth-error', @@ -8,9 +9,17 @@ import {UserService} from "../../user/user.service"; }) export class AuthErrorComponent implements OnInit { - constructor(private readonly _userService: UserService) { } + configuredAdminName: string; + configuredAdminUrl: string; + + constructor(private readonly _userService: UserService, private readonly _appConfigService: AppConfigService) { + } ngOnInit(): void { + + this.configuredAdminName = this._appConfigService.getConfig(AppConfigKey.ADMIN_CONTACT_NAME); + this.configuredAdminUrl = this._appConfigService.getConfig(AppConfigKey.ADMIN_CONTACT_URL); + } logout() { diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json index d2972743d..1a3ee6af6 100644 --- a/apps/red-ui/src/assets/i18n/de.json +++ b/apps/red-ui/src/assets/i18n/de.json @@ -1,4 +1,21 @@ { + "auth-error": { + "heading": { + "label": "Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie Ihren Administrator für den Zugriff!" + }, + "heading-with-name-and-link": { + "label": "Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie {{adminName}} für den Zugriff!" + }, + "heading-with-name": { + "label": "Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie {{adminName}} für den Zugriff!" + }, + "heading-with-link": { + "label": "Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie Ihren Administrator für den Zugriff!" + }, + "logout": { + "label": "Ausloggen" + } + }, "manual-redaction": { "remove-annotation": { "success": { diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 7e0d34b4c..c853030be 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1,7 +1,16 @@ { "auth-error": { "heading": { - "label": "Your user doesn't have the required RED-* roles to access this application" + "label": "Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!" + }, + "heading-with-name-and-link": { + "label": "Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!" + }, + "heading-with-name": { + "label": "Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!" + }, + "heading-with-link": { + "label": "Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!" }, "logout": { "label": "Logout" diff --git a/tools/auto-i18n/translateCache-de.txt b/tools/auto-i18n/translateCache-de.txt index ac0c5f8f5..a363e340a 100644 --- a/tools/auto-i18n/translateCache-de.txt +++ b/tools/auto-i18n/translateCache-de.txt @@ -113,3 +113,7 @@ Archived|Archiviert Ignore|Ignorieren Suggestion for redaction|Redaktionsvorschlag Delete File|Datei löschen +Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie Ihren Administrator für den Zugriff! +Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie {{adminName}} für den Zugriff! +Your user doesn't have the required RED-* roles to access this application. Please contact {{adminName}} for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie {{adminName}} für den Zugriff! +Your user doesn't have the required RED-* roles to access this application. Please contact your admin for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie Ihren Administrator für den Zugriff!