fixed the student_id
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user