added auth error according to RED-421
This commit is contained in:
parent
30871045e7
commit
7afcfefc24
@ -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({
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
<section>
|
||||
<p class="heading-xl" translate="auth-error.heading.label"></p>
|
||||
<a (click)="logout()" translate="auth-error.logout.label"></a>
|
||||
<p class="heading-xl" [translate]="'auth-error.heading.label'"
|
||||
*ngIf="!configuredAdminName && !configuredAdminUrl"></p>
|
||||
<p class="heading-xl"
|
||||
[innerHTML]="'auth-error.heading-with-name-and-link.label' | translate:{adminName: configuredAdminName, adminUrl: configuredAdminUrl}"
|
||||
*ngIf="configuredAdminName && configuredAdminUrl"></p>
|
||||
<p class="heading-xl" [innerHTML]="'auth-error.heading-with-name.label' | translate:{adminName: configuredAdminName }"
|
||||
*ngIf="configuredAdminName && !configuredAdminUrl"></p>
|
||||
<p class="heading-xl" [innerHTML]="'auth-error.heading-with-link.label' | translate:{adminName: configuredAdminName }"
|
||||
*ngIf="!configuredAdminName && configuredAdminUrl"></p>
|
||||
<a (click)="logout()" [translate]="'auth-error.logout.label'"></a>
|
||||
</section>
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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 <a href={{adminUrl}} target=_blank >{{adminName}}</a> 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 <a href={{adminUrl}} target=_blank >Ihren Administrator</a> für den Zugriff!"
|
||||
},
|
||||
"logout": {
|
||||
"label": "Ausloggen"
|
||||
}
|
||||
},
|
||||
"manual-redaction": {
|
||||
"remove-annotation": {
|
||||
"success": {
|
||||
|
||||
@ -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 <a href={{adminUrl}} target=_blank >{{adminName}}</a> 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 <a href={{adminUrl}} target=_blank >your admin</a> for access!"
|
||||
},
|
||||
"logout": {
|
||||
"label": "Logout"
|
||||
|
||||
@ -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 <a href={{adminUrl}} target=_blank >{{adminName}}</a> for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie <a href={{adminUrl}} target=_blank >{{adminName}}</a> 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 <a href={{adminUrl}} target=_blank >your admin</a> for access!|Ihr Benutzer verfügt nicht über die erforderlichen RED- * -Rollen, um auf diese Anwendung zuzugreifen. Bitte kontaktieren Sie <a href={{adminUrl}} target=_blank >Ihren Administrator</a> für den Zugriff!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user