From f697c0ca3d1deba96c338b2966d82d7e3671cb89 Mon Sep 17 00:00:00 2001
From: mechtelm <nicht@mehr.fragen>
Date: Thu, 23 Apr 2020 20:18:49 +0200
Subject: [PATCH] app-root facelifting (privacy separated, status-card added,
 login error message bold etc.)

---
 src/app/app-root/about/about.component.html   | 46 ----------------
 src/app/app-root/about/about.component.ts     | 17 ------
 src/app/app-root/app-root.component.css       |  7 +++
 src/app/app-root/app-root.component.ts        |  4 +-
 .../code-input/code-input.component.html      | 38 ++++++++-----
 .../code-input/code-input.component.ts        |  8 ++-
 src/app/app-root/login/login.component.html   | 48 ++++++++++-------
 src/app/app-root/login/login.component.ts     |  5 +-
 .../app-root/privacy/privacy.component.css    | 11 ++++
 .../app-root/privacy/privacy.component.html   | 43 +++++++++++++++
 .../privacy.component.spec.ts}                | 21 +++-----
 src/app/app-root/privacy/privacy.component.ts | 14 +++++
 .../route-dispatcher.component.html           |  2 -
 .../status-card/status-card.component.html    | 40 +++++++-------
 .../status-card/status-card.component.spec.ts |  6 ++-
 .../status-card/status-card.component.ts      | 54 ++++++++++++++++---
 .../test-starter/test-starter.component.html  |  2 -
 src/app/app-routing.module.ts                 |  5 +-
 src/app/app.config.ts                         |  4 +-
 src/app/app.module.ts                         |  6 +--
 .../test-controller.component.html            |  2 +-
 .../unithost/unit-routing-guards.ts           | 52 +++++++++---------
 src/main.ts                                   |  4 ++
 src/test.ts                                   |  4 ++
 24 files changed, 261 insertions(+), 182 deletions(-)
 delete mode 100644 src/app/app-root/about/about.component.html
 delete mode 100644 src/app/app-root/about/about.component.ts
 create mode 100644 src/app/app-root/app-root.component.css
 create mode 100644 src/app/app-root/privacy/privacy.component.css
 create mode 100644 src/app/app-root/privacy/privacy.component.html
 rename src/app/app-root/{about/about.component.spec.ts => privacy/privacy.component.spec.ts} (54%)
 create mode 100644 src/app/app-root/privacy/privacy.component.ts

diff --git a/src/app/app-root/about/about.component.html b/src/app/app-root/about/about.component.html
deleted file mode 100644
index a377d402..00000000
--- a/src/app/app-root/about/about.component.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<mat-card fxFlex="0 0 500px">
-  <mat-card-title>{{ 'app_title' | customtext:'app_title':cts.updateCount }} - Impressum/Datenschutz</mat-card-title>
-
-  <!-- - - - - - - - - - - - - - - - - -->
-  <mat-card-content>
-    <p>Das <a href="http://www.iqb.hu-berlin.de" target="_blank">Institut zur Qualitätsentwicklung im Bildungswesen</a>
-      {{ 'app_intro1' | customtext:'app_intro1':cts.updateCount }}</p>
-
-    <p>Die mit diesem System erhobenen Daten enthalten grundsätzlich keinen direkten
-      Personenbezug. Es werden z. B. nie Namen gespeichert. Um Auskünfte zu einer bestimmten Befragung bzw. Studie
-      zu erhalten, wenden Sie sich bitte an das <a href="mailto:mechtel@iqb.hu-berlin.de">
-        IQB</a>. Wir benötigen dazu den ungefähren Zeitraum und das Bundesland, in dem die Befragung bzw. Studie
-        durchgeführt wurde.</p>
-
-    <ul>
-      <li>Programmname: {{ appName }}</li>
-      <li>Programmversion: {{ appVersion }}</li>
-      <li>Copyright: {{ appPublisher }}</li>
-    </ul>
-
-    <p>
-        <em>Postanschrift:</em><br/>
-        Humboldt-Universität zu Berlin<br/>
-        Institut zur Qualitätsentwicklung im Bildungswesen<br/>
-        Unter den Linden 6<br/>
-        10099 Berlin</p>
-    <p>
-        <em>Sitz:</em><br/>
-        Luisenstr. 56<br/>
-        10117 Berlin<br/>
-        Tel: +49 [30] 2093 - 46500 (Zentrale)<br/>
-        Fax: +49 [30] 2093 - 46599<br/>
-        E-Mail: <a href="mailto:iqboffice@iqb.hu-berlin.de">iqboffice@iqb.hu-berlin.de</a>
-    </p>
-    <p>
-        <em>Name und Anschrift der Datenschutzbeauftragten</em><br/>
-        Frau Gesine Hoffmann-Holland<br/>
-        Tel: +49 (30) 2093-2591<br/>
-        E-Mail: datenschutz@uv.hu-berlin.de<br/>
-        <a href="http://www.hu-berlin.de/de/datenschutz" target="_blank">www.hu-berlin.de/de/datenschutz</a>
-    </p>
-  </mat-card-content>
-  <mat-card-actions>
-    <button [routerLink]="['/']" mat-raised-button color="primary"><i class="material-icons">arrow_back</i> zurück zur Startseite</button>
-  </mat-card-actions>
-</mat-card>
diff --git a/src/app/app-root/about/about.component.ts b/src/app/app-root/about/about.component.ts
deleted file mode 100644
index ae714b6e..00000000
--- a/src/app/app-root/about/about.component.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Component, Inject } from '@angular/core';
-import { CustomtextService } from 'iqb-components';
-
-@Component({
-  templateUrl: './about.component.html',
-  styles: ['mat-card {background-color: lightgray;}']
-})
-export class AboutComponent {
-
-  constructor(
-    @Inject('APP_NAME') public appName: string,
-    @Inject('APP_PUBLISHER') public appPublisher: string,
-    @Inject('APP_VERSION') public appVersion: string,
-    public cts: CustomtextService
-  ) { }
-
-}
diff --git a/src/app/app-root/app-root.component.css b/src/app/app-root/app-root.component.css
new file mode 100644
index 00000000..e2cc1dc3
--- /dev/null
+++ b/src/app/app-root/app-root.component.css
@@ -0,0 +1,7 @@
+.root-frame {
+  overflow-x: auto;
+  position: absolute;
+  width: 100%;
+  top: 20px;
+  bottom: 0;
+}
diff --git a/src/app/app-root/app-root.component.ts b/src/app/app-root/app-root.component.ts
index c8693a53..e4df4306 100644
--- a/src/app/app-root/app-root.component.ts
+++ b/src/app/app-root/app-root.component.ts
@@ -1,11 +1,11 @@
 import {Component} from '@angular/core';
 
 @Component({
-  template: `<div class="root-frame" fxLayout="row wrap" fxLayoutAlign="center stretch">
+  template: `<div class="root-frame">
                 <router-outlet></router-outlet>
               </div>
               `,
-  styles: ['.root-frame {padding: 80px;}']
+  styleUrls: ['./app-root.component.css']
 })
 export class AppRootComponent {
 }
diff --git a/src/app/app-root/code-input/code-input.component.html b/src/app/app-root/code-input/code-input.component.html
index addaff5b..4f2a9c4f 100644
--- a/src/app/app-root/code-input/code-input.component.html
+++ b/src/app/app-root/code-input/code-input.component.html
@@ -1,16 +1,30 @@
-<mat-card fxFlex="0 0 400px">
-  <form [formGroup]="codeinputform" (ngSubmit)="codeinput()">
-    <mat-card-title>{{ 'login_codeInputTitle' | customtext:'login_codeInputTitle':cts.updateCount }}</mat-card-title>
-    <mat-card-subtitle>{{ 'login_codeInputPrompt' | customtext:'login_codeInputPrompt':cts.updateCount }}</mat-card-subtitle>
+<div  fxLayout="row wrap" fxLayoutAlign="center stretch">
+  <mat-card fxFlex="0 0 400px">
+    <form [formGroup]="codeinputform" (ngSubmit)="codeinput()">
+      <mat-card-title>{{ 'login_codeInputTitle' | customtext:'login_codeInputTitle':cts.updateCount }}</mat-card-title>
+      <mat-card-subtitle>{{ 'login_codeInputPrompt' | customtext:'login_codeInputPrompt':cts.updateCount }}</mat-card-subtitle>
+      <mat-card-content>
+        <mat-form-field>
+          <input matInput formControlName="code"> <!-- no placeholder! -->
+        </mat-form-field>
+        <p style="color: chocolate"><b>{{ problemText }}</b></p>
+      </mat-card-content>
+      <mat-card-actions>
+        <button mat-raised-button type="submit" [disabled]="codeinputform.invalid" color="primary">Weiter</button>
+        <button mat-raised-button color="foreground" (click)="resetLogin()">Neu anmelden</button>
+      </mat-card-actions>
+    </form>
+  </mat-card>
+
+  <mat-card fxFlex="0 0 400px" class="mat-card-gray">
+    <mat-card-title>{{ 'app_title' | customtext:'app_title':cts.updateCount }}</mat-card-title>
+
     <mat-card-content>
-      <mat-form-field>
-        <input matInput formControlName="code"> <!-- no placeholder! -->
-      </mat-form-field>
-      <p>{{ problemText }}</p>
+
+      <status-card></status-card>
     </mat-card-content>
     <mat-card-actions>
-      <button mat-raised-button type="submit" [disabled]="codeinputform.invalid" color="primary">Weiter</button>
-      <button mat-raised-button color="foreground" (click)="resetLogin()">Neu anmelden</button>
+      <button [routerLink]="['/priv']" mat-raised-button color="primary">Impressum/Datenschutz</button>
     </mat-card-actions>
-  </form>
-</mat-card>
+  </mat-card>
+</div>
diff --git a/src/app/app-root/code-input/code-input.component.ts b/src/app/app-root/code-input/code-input.component.ts
index cfc31613..d1012cee 100644
--- a/src/app/app-root/code-input/code-input.component.ts
+++ b/src/app/app-root/code-input/code-input.component.ts
@@ -8,7 +8,11 @@ import {AuthData} from "../../app.interfaces";
 import {BackendService} from "../../backend.service";
 
 @Component({
-  templateUrl: './code-input.component.html'
+  templateUrl: './code-input.component.html',
+  styles: [
+    'mat-card {margin: 10px;}',
+    '.mat-card-gray {background-color: lightgray}'
+  ]
 })
 export class CodeInputComponent implements OnInit{
   @ViewChild('codeInputControl') codeInputControl: FormControl;
@@ -55,7 +59,7 @@ export class CodeInputComponent implements OnInit{
           if (typeof authData === 'number') {
             const errCode = authData as number;
             if (errCode === 400) {
-              this.problemText = 'Der Code ist leider nicht gültig.';
+              this.problemText = 'Der Code ist leider nicht gültig. Bitte nocheinmal versuchen';
             } else {
               this.problemText = 'Problem bei der Anmeldung.';
               // app.interceptor will show error message
diff --git a/src/app/app-root/login/login.component.html b/src/app/app-root/login/login.component.html
index a40024f8..67ad5c2a 100644
--- a/src/app/app-root/login/login.component.html
+++ b/src/app/app-root/login/login.component.html
@@ -1,21 +1,33 @@
-<!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -->
-<mat-card fxFlex="0 0 400px" fxLayout="column">
-  <!-- - - - - - - - - - - - - - - - - -->
-  <form [formGroup]="loginForm" (ngSubmit)="login()">
-    <mat-card-title>Anmelden</mat-card-title>
-    <mat-card-content fxLayout="column">
-      <mat-form-field>
-        <input matInput formControlName="name" placeholder="Anmeldename" (keyup.enter)="pw.focus()">
-      </mat-form-field>
-      <mat-form-field>
-        <input matInput #pw type="password" formControlName="pw" placeholder="Kennwort">
-      </mat-form-field>
-      <p>{{ problemText }}</p>
+<div  fxLayout="row wrap" fxLayoutAlign="center stretch">
+  <mat-card fxFlex="0 0 400px">
+    <form [formGroup]="loginForm" (ngSubmit)="login()">
+      <mat-card-title>Anmelden</mat-card-title>
+      <mat-card-content fxLayout="column">
+        <mat-form-field>
+          <input matInput formControlName="name" placeholder="Anmeldename" (keyup.enter)="pw.focus()">
+        </mat-form-field>
+        <mat-form-field>
+          <input matInput #pw type="password" formControlName="pw" placeholder="Kennwort">
+        </mat-form-field>
+        <p style="color: chocolate"><b>{{ problemText }}</b></p>
+      </mat-card-content>
+      <mat-card-actions>
+        <button mat-raised-button type="submit" [disabled]="loginForm.invalid" color="primary">Weiter</button>
+      </mat-card-actions>
+    </form>
+  </mat-card>
+
+  <mat-card fxFlex="0 0 400px" class="mat-card-gray">
+    <mat-card-title>{{ 'app_title' | customtext:'app_title':cts.updateCount }}</mat-card-title>
+
+    <mat-card-content>
+      <p>Das <a href="http://www.iqb.hu-berlin.de" target="_blank">Institut zur Qualitätsentwicklung im Bildungswesen</a>
+        {{ 'app_intro1' | customtext:'app_intro1':cts.updateCount }}</p>
+
+      <status-card></status-card>
     </mat-card-content>
     <mat-card-actions>
-      <button mat-raised-button type="submit" [disabled]="loginForm.invalid" color="primary">Weiter</button>
+      <button [routerLink]="['/priv']" mat-raised-button color="primary">Impressum/Datenschutz</button>
     </mat-card-actions>
-  </form>
-</mat-card>
-
-<app-status-card *ngIf="! returnTo"></app-status-card>
+  </mat-card>
+</div>
diff --git a/src/app/app-root/login/login.component.ts b/src/app/app-root/login/login.component.ts
index b959ea85..f69c0145 100644
--- a/src/app/app-root/login/login.component.ts
+++ b/src/app/app-root/login/login.component.ts
@@ -10,7 +10,8 @@ import {BackendService} from "../../backend.service";
 @Component({
   templateUrl: './login.component.html',
   styles: [
-    'mat-card {margin: 10px;}'
+    'mat-card {margin: 10px;}',
+    '.mat-card-gray {background-color: lightgray}'
   ]
 })
 
@@ -48,7 +49,7 @@ export class LoginComponent  implements OnInit, OnDestroy {
         if (typeof authData === 'number') {
           const errCode = authData as number;
           if (errCode === 400) {
-            this.problemText = 'Anmeldedaten sind nicht gültig.';
+            this.problemText = 'Anmeldedaten sind nicht gültig. Bitte nocheinmal versuchen!';
           } else {
             this.problemText = 'Problem bei der Anmeldung.';
             // app.interceptor will show error message
diff --git a/src/app/app-root/privacy/privacy.component.css b/src/app/app-root/privacy/privacy.component.css
new file mode 100644
index 00000000..388f635b
--- /dev/null
+++ b/src/app/app-root/privacy/privacy.component.css
@@ -0,0 +1,11 @@
+mat-card {
+  background-color: lightgray
+}
+
+.root-frame {
+  overflow-x: auto;
+  position: absolute;
+  width: 100%;
+  top: 20px;
+  bottom: 0;
+}
diff --git a/src/app/app-root/privacy/privacy.component.html b/src/app/app-root/privacy/privacy.component.html
new file mode 100644
index 00000000..6c24a6f0
--- /dev/null
+++ b/src/app/app-root/privacy/privacy.component.html
@@ -0,0 +1,43 @@
+<div class="root-frame" fxLayout="row wrap" fxLayoutAlign="center stretch">
+  <mat-card fxFlex="0 0 500px">
+    <mat-card-title>{{ 'app_title' | customtext:'app_title':cts.updateCount }} - Impressum/Datenschutz</mat-card-title>
+
+    <!-- - - - - - - - - - - - - - - - - -->
+    <mat-card-content>
+      <p>Das <a href="http://www.iqb.hu-berlin.de" target="_blank">Institut zur Qualitätsentwicklung im Bildungswesen</a>
+        {{ 'app_intro1' | customtext:'app_intro1':cts.updateCount }}</p>
+
+      <p>Die mit diesem System erhobenen Daten enthalten grundsätzlich keinen direkten
+        Personenbezug. Es werden z. B. nie Namen gespeichert. Um Auskünfte zu einer bestimmten Befragung bzw. Studie
+        zu erhalten, wenden Sie sich bitte an das <a href="mailto:mechtel@iqb.hu-berlin.de">
+          IQB</a>. Wir benötigen dazu den ungefähren Zeitraum und das Bundesland, in dem die Befragung bzw. Studie
+        durchgeführt wurde.</p>
+
+      <p>
+        <em>Postanschrift:</em><br/>
+        Humboldt-Universität zu Berlin<br/>
+        Institut zur Qualitätsentwicklung im Bildungswesen<br/>
+        Unter den Linden 6<br/>
+        10099 Berlin</p>
+      <p>
+        <em>Sitz:</em><br/>
+        Luisenstr. 56<br/>
+        10117 Berlin<br/>
+        Tel: +49 [30] 2093 - 46500 (Zentrale)<br/>
+        Fax: +49 [30] 2093 - 46599<br/>
+        E-Mail: <a href="mailto:iqboffice@iqb.hu-berlin.de">iqboffice@iqb.hu-berlin.de</a>
+      </p>
+      <p>
+        <em>Name und Anschrift der Datenschutzbeauftragten</em><br/>
+        Frau Gesine Hoffmann-Holland<br/>
+        Tel: +49 (30) 2093-2591<br/>
+        E-Mail: datenschutz@uv.hu-berlin.de<br/>
+        <a href="http://www.hu-berlin.de/de/datenschutz" target="_blank">www.hu-berlin.de/de/datenschutz</a>
+      </p>
+      <status-card></status-card>
+    </mat-card-content>
+    <mat-card-actions>
+      <button [routerLink]="['/']" mat-raised-button color="primary"><i class="material-icons">arrow_back</i> zurück zur Startseite</button>
+    </mat-card-actions>
+  </mat-card>
+</div>
diff --git a/src/app/app-root/about/about.component.spec.ts b/src/app/app-root/privacy/privacy.component.spec.ts
similarity index 54%
rename from src/app/app-root/about/about.component.spec.ts
rename to src/app/app-root/privacy/privacy.component.spec.ts
index 96e1e9db..56434438 100644
--- a/src/app/app-root/about/about.component.spec.ts
+++ b/src/app/app-root/privacy/privacy.component.spec.ts
@@ -1,34 +1,27 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { AboutComponent } from './about.component';
-import {HttpClientModule} from "@angular/common/http";
-import {BackendService} from "../../backend.service";
+import { PrivacyComponent } from './privacy.component';
 import {AppRoutingModule} from "../../app-routing.module";
 import {IqbComponentsModule} from "iqb-components";
 
-describe('AboutComponent', () => {
-  let component: AboutComponent;
-  let fixture: ComponentFixture<AboutComponent>;
+describe('PrivacyComponent', () => {
+  let component: PrivacyComponent;
+  let fixture: ComponentFixture<PrivacyComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [
-        AboutComponent
-      ],
+      declarations: [ PrivacyComponent ],
       imports: [
-        HttpClientModule,
         AppRoutingModule,
         IqbComponentsModule
       ],
-      providers: [
-        BackendService
-      ]
+
     })
     .compileComponents();
   }));
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(AboutComponent);
+    fixture = TestBed.createComponent(PrivacyComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });
diff --git a/src/app/app-root/privacy/privacy.component.ts b/src/app/app-root/privacy/privacy.component.ts
new file mode 100644
index 00000000..472f2a9b
--- /dev/null
+++ b/src/app/app-root/privacy/privacy.component.ts
@@ -0,0 +1,14 @@
+import { Component } from '@angular/core';
+import {CustomtextService} from "iqb-components";
+
+@Component({
+  templateUrl: './privacy.component.html',
+  styleUrls: ['./privacy.component.css']
+})
+export class PrivacyComponent {
+
+  constructor(
+    public cts: CustomtextService
+  ) { }
+
+}
diff --git a/src/app/app-root/route-dispatcher/route-dispatcher.component.html b/src/app/app-root/route-dispatcher/route-dispatcher.component.html
index 91080f80..faf58cf1 100644
--- a/src/app/app-root/route-dispatcher/route-dispatcher.component.html
+++ b/src/app/app-root/route-dispatcher/route-dispatcher.component.html
@@ -11,6 +11,4 @@
       <button [routerLink]="['/']" mat-raised-button color="primary">Zur Startseite</button>
     </mat-card-actions>
   </mat-card>
-
-  <app-status-card></app-status-card>
 </div>
diff --git a/src/app/app-root/status-card/status-card.component.html b/src/app/app-root/status-card/status-card.component.html
index 26a56248..5bf55649 100644
--- a/src/app/app-root/status-card/status-card.component.html
+++ b/src/app/app-root/status-card/status-card.component.html
@@ -1,19 +1,21 @@
-<mat-card fxFlex="0 2 400px" fxLayout="column" class="status-card">
-  <mat-card-title>{{ 'app_title' | customtext:'app_title':cts.updateCount }}</mat-card-title>
-
-  <!-- - - - - - - - - - - - - - - - - -->
-  <mat-card-content>
-    <p>Das <a href="http://www.iqb.hu-berlin.de" target="_blank">Institut zur Qualitätsentwicklung im Bildungswesen</a>
-      {{ 'app_intro1' | customtext:'app_intro1':cts.updateCount }}</p>
-
-    <p>Die mit diesem System erhobenen Daten enthalten grundsätzlich keinen direkten
-      Personenbezug. Es werden z. B. nie Namen gespeichert. Um Auskünfte zu einer bestimmten Befragung bzw. Studie
-      zu erhalten, wenden Sie sich bitte an das <a href="mailto:mechtel@iqb.hu-berlin.de">
-        IQB</a>. Wir benötigen dazu den ungefähren Zeitraum und das Bundesland, in dem die Befragung bzw. Studie
-      durchgeführt wurde.</p>
-  </mat-card-content>
-  <mat-card-actions>
-    <button mat-raised-button color="foreground" [routerLink]="['/r/about']">Impressum/Datenschutz</button>
-    <button mat-raised-button color="foreground" [routerLink]="['/r/check-starter']">System-Check</button>
-  </mat-card-actions>
-</mat-card>
+<div fxLayout="column">
+  <div *ngIf="loginName">
+    <p><b>Status: Angemeldet als "{{loginName}}"</b></p>
+    <p style="margin-bottom: 0px;">
+      <b *ngIf="loginAuthority.length > 1">Berechtigungen:</b>
+      <b *ngIf="loginAuthority.length === 1">Berechtigung:</b>
+    </p>
+    <ul style="margin: 0px;">
+      <li *ngFor="let loginAuth of loginAuthority">{{loginAuth}}</li>
+    </ul>
+  </div>
+  <p *ngIf="!loginName"><b>Status: Derzeit nicht angemeldet.</b></p>
+  <p style="margin-bottom: 0px;"><b>Angaben zu dieser Web-Anwendung:</b></p>
+  <ul style="margin: 0px;">
+    <li>Interner Programmname: {{ appName }}</li>
+    <li>Programmversion: {{ appVersion }}</li>
+    <li *ngIf="!isProductionMode">Build-Modus: Dev</li>
+    <li>Erforderliche Version der Server-Programmierung: {{ apiVersionExpected }}</li>
+    <li>Copyright: {{ appPublisher }}</li>
+  </ul>
+</div>
diff --git a/src/app/app-root/status-card/status-card.component.spec.ts b/src/app/app-root/status-card/status-card.component.spec.ts
index d3898254..70cf3bcf 100644
--- a/src/app/app-root/status-card/status-card.component.spec.ts
+++ b/src/app/app-root/status-card/status-card.component.spec.ts
@@ -1,7 +1,7 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { StatusCardComponent } from './status-card.component';
-import {IqbComponentsModule} from "iqb-components";
+import {MainDataService} from "../../maindata.service";
 
 describe('StatusCardComponent', () => {
   let component: StatusCardComponent;
@@ -10,7 +10,9 @@ describe('StatusCardComponent', () => {
   beforeEach(async(() => {
     TestBed.configureTestingModule({
       declarations: [ StatusCardComponent ],
-      imports: [IqbComponentsModule]
+      providers: [
+        MainDataService
+      ]
     })
     .compileComponents();
   }));
diff --git a/src/app/app-root/status-card/status-card.component.ts b/src/app/app-root/status-card/status-card.component.ts
index 8442135b..056e8fb1 100644
--- a/src/app/app-root/status-card/status-card.component.ts
+++ b/src/app/app-root/status-card/status-card.component.ts
@@ -1,18 +1,56 @@
-import { Component, OnInit } from '@angular/core';
-import {CustomtextService} from "iqb-components";
+import {Component, Inject, OnInit} from '@angular/core';
+import {MainDataService} from "../../maindata.service";
+import {AuthAccessKeyType, AuthFlagType} from "../../app.interfaces";
 
 @Component({
-  selector: 'app-status-card',
-  templateUrl: './status-card.component.html',
-  styles: [
-    'mat-card {margin: 10px; background-color: lightgray}'
-  ]
+  selector: 'status-card',
+  templateUrl: './status-card.component.html'
 })
 export class StatusCardComponent implements OnInit {
+  loginName = '';
+  loginAuthority: string[] = [];
+
   constructor(
-    public cts: CustomtextService) {}
+    @Inject('APP_NAME') public appName: string,
+    @Inject('APP_PUBLISHER') public appPublisher: string,
+    @Inject('APP_VERSION') public appVersion: string,
+    @Inject('API_VERSION_EXPECTED') public apiVersionExpected: string,
+    @Inject('IS_PRODUCTION_MODE') public isProductionMode
+  ) { }
 
   ngOnInit(): void {
+    setTimeout(() => {
+      const authData = MainDataService.getAuthDataFromLocalStorage();
+      if (authData) {
+        this.loginName = authData.displayName;
+        if (authData.access[AuthAccessKeyType.WORKSPACE_ADMIN]) {
+          this.loginAuthority.push('Verwaltung von Testinhalten');
+        }
+        if (authData.access[AuthAccessKeyType.SUPER_ADMIN]) {
+          this.loginAuthority.push('Verwaltung von Nutzerrechten und von grundsätzlichen Systemeinstellungen');
+        }
+        if (authData.access[AuthAccessKeyType.TEST]) {
+          if (authData.access[AuthAccessKeyType.TEST].length > 1) {
+            this.loginAuthority.push('Ausführung/Ansicht von Befragungen oder Testheften');
+          } else {
+            this.loginAuthority.push('Ausführung/Ansicht einer Befragung oder eines Testheftes');
+          }
+        }
+        if (authData.access[AuthAccessKeyType.WORKSPACE_MONITOR]) {
+          if (authData.access[AuthAccessKeyType.WORKSPACE_MONITOR].length > 1) {
+            this.loginAuthority.push('Beobachtung/Prüfung der Durchführung von Befragungen oder Kompetenztests');
+          } else {
+            this.loginAuthority.push('Beobachtung/Prüfung der Durchführung einer Befragung oder eines Kompetenztests');
+          }
+        }
+        if (authData.access[AuthAccessKeyType.TEST_GROUP_MONITOR]) {
+          this.loginAuthority.push('Beobachtung/Prüfung einer Testgruppe');
+        }
+        if (authData.flags.indexOf(AuthFlagType.CODE_REQUIRED) >= 0) {
+          this.loginAuthority.push('Code-Eingabe erforderlich');
+        }
+      }
+    })
   }
 
 }
diff --git a/src/app/app-root/test-starter/test-starter.component.html b/src/app/app-root/test-starter/test-starter.component.html
index a3b29207..119417c5 100644
--- a/src/app/app-root/test-starter/test-starter.component.html
+++ b/src/app/app-root/test-starter/test-starter.component.html
@@ -16,5 +16,3 @@
     <button mat-raised-button color="foreground" (click)="resetLogin()">Neu anmelden</button>
   </mat-card-actions>
 </mat-card>
-
-<app-status-card></app-status-card>
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index fa4eda54..e5373412 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,4 +1,3 @@
-import { AboutComponent } from './app-root/about/about.component';
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule } from '@angular/router';
 import {AppRootComponent} from "./app-root/app-root.component";
@@ -9,6 +8,7 @@ import {CodeInputComponent} from "./app-root/code-input/code-input.component";
 import {DirectLoginActivateGuard, RouteDispatcherActivateGuard} from "./app-routing-guards";
 import {TestStarterComponent} from "./app-root/test-starter/test-starter.component";
 import {RouteDispatcherComponent} from "./app-root/route-dispatcher/route-dispatcher.component";
+import {PrivacyComponent} from "./app-root/privacy/privacy.component";
 
 
 const routes: Routes = [
@@ -22,7 +22,6 @@ const routes: Routes = [
       {path: '', redirectTo: 'route-dispatcher', pathMatch: 'full'},
       {path: 'login', redirectTo: 'route-dispatcher', pathMatch: 'full'},
       {path: 'login/:returnTo', component: LoginComponent},
-      {path: 'about', component: AboutComponent},
       {path: 'check-starter', component: SysCheckStarterComponent},
       {path: 'test-starter', component: TestStarterComponent},
       {path: 'admin-starter', component: AdminStarterComponent},
@@ -30,7 +29,7 @@ const routes: Routes = [
       {path: 'code-input', component: CodeInputComponent}
     ]
   },
-  {path: 'about', component: AboutComponent},
+  {path: 'priv', component: PrivacyComponent},
   {path: 'check', loadChildren: () => import('./sys-check/sys-check.module').then(m => m.SysCheckModule)},
   {path: 'admin', loadChildren: () => import('./workspace-admin/workspace.module').then(m => m.WorkspaceModule)},
   {path: 'superadmin', loadChildren: () => import('./superadmin/superadmin.module').then(m => m.SuperadminModule)},
diff --git a/src/app/app.config.ts b/src/app/app.config.ts
index ebf413c6..353ea293 100644
--- a/src/app/app.config.ts
+++ b/src/app/app.config.ts
@@ -18,9 +18,9 @@ export const appconfig = {
         description: 'Titel der Hauptanwendung, z. B. Homepage'
       },
       'intro1': {
-        defaultvalue: 'betreibt auf diesen Seiten eine Pilotanwendung für das computerbasierte Leistungstesten von ' +
+        defaultvalue: 'betreibt auf diesen Seiten eine Anwendung für das computerbasierte Leistungstesten von ' +
           'Schülerinnen und Schülern. Der Zugang zu einem Test ist nur möglich, wenn Sie von Testverantwortlichen ' +
-          'Zugangsdaten erhalten haben, die Sie bitte links eingeben. Es sind keine weiteren Seiten öffentlich verfügbar.',
+          'Zugangsdaten erhalten haben. Es sind keine weiteren Seiten öffentlich verfügbar.',
         description: 'Begrüßungstext auf der Startseite'
       }
     }
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 7f9c74cc..1ffed132 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -1,4 +1,3 @@
-import { AboutComponent } from './app-root/about/about.component';
 import { BrowserModule } from '@angular/platform-browser';
 import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@@ -36,13 +35,13 @@ import { RouteDispatcherComponent } from './app-root/route-dispatcher/route-disp
 import { StatusCardComponent } from './app-root/status-card/status-card.component';
 import { TestStarterComponent } from './app-root/test-starter/test-starter.component';
 import { MonitorStarterComponent } from './app-root/monitor-starter/monitor-starter.component';
+import { PrivacyComponent } from './app-root/privacy/privacy.component';
 
 
 
 @NgModule({
   declarations: [
     AppComponent,
-    AboutComponent,
     AppRootComponent,
     SysCheckStarterComponent,
     LoginComponent,
@@ -51,7 +50,8 @@ import { MonitorStarterComponent } from './app-root/monitor-starter/monitor-star
     RouteDispatcherComponent,
     StatusCardComponent,
     TestStarterComponent,
-    MonitorStarterComponent
+    MonitorStarterComponent,
+    PrivacyComponent
   ],
   imports: [
     ApplicationModule,
diff --git a/src/app/test-controller/test-controller.component.html b/src/app/test-controller/test-controller.component.html
index 4bed20a9..2000e2f0 100644
--- a/src/app/test-controller/test-controller.component.html
+++ b/src/app/test-controller/test-controller.component.html
@@ -24,7 +24,7 @@
     <button mat-button (click)="showReviewDialog()" *ngIf="tcs.mode === runModeKey.REVIEW" matTooltip="Kommentar senden" fxFlex="none">
       <mat-icon>rate_review</mat-icon>
     </button>
-    <button mat-button (click)="tcs.setUnitNavigationRequest(unitNavigationTarget.END)"
+    <button mat-button [routerLink]="['/']"
             *ngIf="(tcs.mode !== runModeKey.HOT_RESTART) && (tcs.mode !== runModeKey.HOT_RETURN)"
             matTooltip="Zur Testheft-Auswahl zurückkehren" fxFlex="none">
       <mat-icon>exit_to_app</mat-icon>
diff --git a/src/app/test-controller/unithost/unit-routing-guards.ts b/src/app/test-controller/unithost/unit-routing-guards.ts
index adac65e4..f16c7d75 100644
--- a/src/app/test-controller/unithost/unit-routing-guards.ts
+++ b/src/app/test-controller/unithost/unit-routing-guards.ts
@@ -113,7 +113,7 @@ export class UnitActivateGuard implements CanActivate {
             testletId: t.id,
             prompt: t.codePrompt,
             code: t.codeToEnter.toUpperCase().trim(),
-            value: this.tcs.mode === (RunModeKey.HOT_RETURN || RunModeKey.HOT_RESTART) ? '' : t.codeToEnter
+            value: (this.tcs.mode === RunModeKey.HOT_RETURN || this.tcs.mode === RunModeKey.HOT_RESTART) ? '' : t.codeToEnter
           });
         });
 
@@ -128,40 +128,38 @@ export class UnitActivateGuard implements CanActivate {
         });
         return dialogRef.afterClosed().pipe(
           switchMap(result => {
-            console.log(typeof result);
-            console.log(result);
-              if ((typeof result === 'undefined') || (result === false)) {
-                return of(false);
-              } else {
-                let codesOk = true;
-                for (const c of myCodes) {
-                  const testeeInput = result[c.testletId];
-                  if (testeeInput) {
-                    if (c.value.toUpperCase().trim() !== testeeInput.toUpperCase().trim()) {
-                      codesOk = false;
-                      break;
-                    }
-                  } else {
+            if ((typeof result === 'undefined') || (result === false)) {
+              return of(false);
+            } else {
+              let codesOk = true;
+              for (const c of myCodes) {
+                const testeeInput = result[c.testletId];
+                if (testeeInput) {
+                  if (c.value.toUpperCase().trim() !== testeeInput.toUpperCase().trim()) {
                     codesOk = false;
                     break;
                   }
+                } else {
+                  codesOk = false;
+                  break;
                 }
-                if (codesOk) {
-                  newUnit.codeRequiringTestlets.forEach(t => {
-                    t.codeToEnter = '';
-                  });
+              }
+              if (codesOk) {
+                newUnit.codeRequiringTestlets.forEach(t => {
+                  t.codeToEnter = '';
+                });
 
-                  return of(true);
+                return of(true);
 
-                } else {
-                  this.snackBar.open(
-                    'Die Eingabe war nicht korrekt.', this.cts.getCustomText('booklet_codeToEnterTitle'),
-                    {duration: 3000}
-                  );
-                  return of(false);
-                }
+              } else {
+                this.snackBar.open(
+                  'Die Eingabe war nicht korrekt.', this.cts.getCustomText('booklet_codeToEnterTitle'),
+                  {duration: 3000}
+                );
+                return of(false);
               }
             }
+          }
         ));
       } else {
         return of(true);
diff --git a/src/main.ts b/src/main.ts
index 40a01d16..7f12f939 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -28,6 +28,10 @@ platformBrowserDynamic(<StaticProvider[]>[
   {
     provide: 'API_VERSION_EXPECTED',
     useValue: environment.apiVersionExpected
+  },
+  {
+    provide: 'IS_PRODUCTION_MODE',
+    useValue: environment.production
   }
 ]).bootstrapModule(AppModule)
   .catch(err => console.log(err));
diff --git a/src/test.ts b/src/test.ts
index b55cc5aa..09fd9254 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -34,6 +34,10 @@ getTestBed().initTestEnvironment(
     {
       provide: 'API_VERSION_EXPECTED',
       useValue: environment.apiVersionExpected
+    },
+    {
+      provide: 'IS_PRODUCTION_MODE',
+      useValue: environment.production
     }
   ])
 );
-- 
GitLab