nutzer einladen + sesssion cache correct clear

This commit is contained in:
Simon Martens
2025-05-24 10:57:31 +02:00
parent a46e2bc474
commit 74de26f560
7 changed files with 226 additions and 124 deletions

View File

@@ -33,7 +33,7 @@
{{ end }}
<form class="w-full grid grid-cols-3 gap-4" method="POST" x-data="{ openpw: false }">
<div
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="username" class="text-sm text-gray-700 font-bold">
@@ -43,7 +43,7 @@
type="text"
name="name"
id="name"
class="mt-1 block w-full rounded-md focus:border-none focus:outline-none"
class="mt-1 block w-full focus:border-none focus:outline-none"
placeholder=""
required
autocomplete="off"
@@ -51,7 +51,7 @@
autofocus />
</div>
<div
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="username" class="text-sm text-gray-700 font-bold">
@@ -68,7 +68,7 @@
value="{{ $model.user.Email }}" />
</div>
<div
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="role" class="text-sm text-gray-700 font-bold">
@@ -94,6 +94,32 @@
</option>
</select>
</div>
{{- if and
(eq $model.request.user.Role "Admin")
(eq $model.request.user.Id
$model.user.Id)
-}}
<div class="flex flex-row col-span-3">
<div class="align-top">
<i class="ri-information-line text-gray-700 mt-2 mr-2 align-top"></i>
</div>
<p class="text-sm text-gray-700 max-w-[80ch]">
Achtung! Wenn Sie Ihre eigenen Berechtigungen ändern, verlieren Sie die Möglichkeit,
diese Änderungen rückgängig zu machen. Weiter werden Sie von allen laufenden Sitzungen
abgemeldet und müssen sich erneut anmelden.
</p>
</div>
{{- else if (eq $model.request.user.Role "Admin") -}}
<div class="flex flex-row col-span-3">
<div class="align-top">
<i class="ri-information-line text-gray-700 mt-2 mr-2 align-top"></i>
</div>
<p class="text-sm text-gray-700 max-w-[80ch]">
Achtung! Wenn Sie die Rolle eines Benutzers ändern, wird dieser von allen laufenden
Sitzungen abgemeldet und muss sich erneut anmelden.
</p>
</div>
{{- end -}}
<div class="col-span-3">
<div class="flex items-center">
<input type="checkbox" name="openpw" id="openpw" x-model="openpw" class="mr-2" />
@@ -105,7 +131,7 @@
{{- if not (eq $model.request.user.Role "Admin") -}}
<div
x-bind:style="!openpw ? 'display:none' : ''"
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="password_old" class="text-sm text-gray-700 font-bold"> Altes Passwort </label>
@@ -120,7 +146,7 @@
{{- end -}}
<div
x-bind:style="!openpw ? 'display:none' : ''"
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="password" class="text-sm text-gray-700 font-bold"> Neues Passwort </label>
@@ -135,7 +161,7 @@
</div>
<div
x-bind:style="!openpw ? 'display:none' : ''"
class="col-span-3 border-2 border-transparent px-2
class="rounded-xs col-span-3 border-2 border-transparent px-3
py-1 pb-1.5 border-l-2 focus-within:border-l-slate-600
bg-slate-200 focus-within:bg-slate-100 transition-all duration-100">
<label for="password_repeat" class="text-sm text-gray-700 font-bold">