From 81327b6553760326cf91b5cd8ae3cb75fbea5960 Mon Sep 17 00:00:00 2001 From: Rhywden Date: Sun, 23 Aug 2026 20:19:06 +0200 Subject: [PATCH] fixed the student_id --- Wollmilchsau/Components/Pages/Students/Questionaire.razor | 7 +++---- Wollmilchsau/appsettings.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Wollmilchsau/Components/Pages/Students/Questionaire.razor b/Wollmilchsau/Components/Pages/Students/Questionaire.razor index 57eb3b4..36ee847 100644 --- a/Wollmilchsau/Components/Pages/Students/Questionaire.razor +++ b/Wollmilchsau/Components/Pages/Students/Questionaire.razor @@ -1,5 +1,4 @@ @page "/students/questionaire" -@using System.Security.Claims @inherits Fluxor.Blazor.Web.Components.FluxorComponent @inject AuthenticationStateProvider AuthenticationStateProvider @inject Fluxor.IDispatcher Dispatcher @@ -78,11 +77,11 @@ var authenticationState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); var user = authenticationState.User; - var studentId = user.FindFirst(ClaimTypes.NameIdentifier)?.Value ?? user.FindFirst("sub")?.Value ?? user.Identity?.Name; + var preferredUsername = user.FindFirst("preferred_username")?.Value; - if (!string.IsNullOrWhiteSpace(studentId)) + if (!string.IsNullOrWhiteSpace(preferredUsername)) { - Dispatcher.Dispatch(new Wollmilchsau.Store.QuestionnaireStore.LoadQuestionnaire(studentId, user.FindFirst("classroom")?.Value)); + Dispatcher.Dispatch(new Wollmilchsau.Store.QuestionnaireStore.LoadQuestionnaire(preferredUsername, user.FindFirst("classroom")?.Value)); } } diff --git a/Wollmilchsau/appsettings.json b/Wollmilchsau/appsettings.json index 4da1fea..24be98b 100644 --- a/Wollmilchsau/appsettings.json +++ b/Wollmilchsau/appsettings.json @@ -48,7 +48,7 @@ } }, "LDAP": { - "LdapUri": "ldaps://bs18-hh.de:10636", + "LdapUri": "ldaps://212.12.36.11:10636", "BindPassword": "skMXHFyf3fjW4iJhsoEyfQdc0wYthuVs6xim7BKhX3c5EZSuPcRrYYiGonynBnHW", "BindDN": "cn=bs18ldap,ou=ldap,dc=bs18-hh,dc=de", "BaseDN": "dc=bs18-hh,dc=de",