From 9ed6f9968e12892390805ce125b58cf1c945e150 Mon Sep 17 00:00:00 2001 From: Patrick Mueller Date: Sun, 14 May 2023 21:08:55 +0200 Subject: [PATCH] Upgrade to proper user management --- src/app/models/session.ts | 4 ++ src/app/models/user.ts | 7 +++ src/app/pages/admin/admin.component.html | 22 ++++++- src/app/pages/admin/admin.component.ts | 77 +++++++++++++++++++++--- src/app/services/api.service.ts | 77 +++++++++++++++++++----- src/app/services/utils.service.ts | 18 ++++++ 6 files changed, 179 insertions(+), 26 deletions(-) create mode 100644 src/app/models/session.ts create mode 100644 src/app/models/user.ts diff --git a/src/app/models/session.ts b/src/app/models/session.ts new file mode 100644 index 0000000..df8d9c5 --- /dev/null +++ b/src/app/models/session.ts @@ -0,0 +1,4 @@ +export interface Session { + sessionId: number; + sessionKey: string; +} diff --git a/src/app/models/user.ts b/src/app/models/user.ts new file mode 100644 index 0000000..4216773 --- /dev/null +++ b/src/app/models/user.ts @@ -0,0 +1,7 @@ +export interface User { + userId: number; + fullName: string; + passwordHash: string; + email: string; + isActive: boolean; +} diff --git a/src/app/pages/admin/admin.component.html b/src/app/pages/admin/admin.component.html index 5f132f6..a60cdb5 100644 --- a/src/app/pages/admin/admin.component.html +++ b/src/app/pages/admin/admin.component.html @@ -1,12 +1,30 @@

Please log in:

+ +

+ +

+

If you dont' have an account yet, please use the following form to register:

- +
+ +
+ +
+ +
+

Passwords have to use uppercase and lowercase letters, numbers and must have at least 12 characters!

+

Passwords do not match!

+
- Logged in as {{getUserName()}}  |   + Logged in as {{getUserName()}} +  (inactive) +   + +   |   Calendar: