lokale Authentifizierung mit Standard-User admin+changeme
This commit is contained in:
@@ -76,11 +76,29 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@{
|
||||
|
||||
<h3>Alle Claims</h3>
|
||||
<ul>
|
||||
@foreach (var claim in User.Claims)
|
||||
{
|
||||
<li>@claim.Type: @claim.Value</li>
|
||||
}
|
||||
</ul>
|
||||
@if (User.Identity.Name == "admin")
|
||||
{
|
||||
<h3>Benutzerdaten ändern</h3>
|
||||
<form asp-action="Edit" method="post" asp-controller="Auth">
|
||||
<div class="mb-3">
|
||||
<label for="Username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="Username" name="Username" value="@User.Identity?.Name" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="NewPassword" class="form-label">Neues Passwort</label>
|
||||
<input type="password" class="form-control" id="NewPassword" name="NewPassword" />
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="ConfirmPassword" class="form-label">Passwort bestätigen</label>
|
||||
<input type="password" class="form-control" id="ConfirmPassword" name="ConfirmPassword" />
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Benutzerdaten können nur für lokal angemeldete Nutzer geändert werden.</p>
|
||||
}
|
||||
|
Reference in New Issue
Block a user