feat: User-Zuordnung für Sessions und Agents
- UserId-Feld zu SessionRecord und AgentRecord hinzugefügt - DB-Migration: user_id Spalte + bestehende Daten dem Admin zuweisen - Alle Endpoints filtern/prüfen nach UserId des eingeloggten Users - HttpContextExtensions.GetUserId() Helper für konsistenten Zugriff - Betrifft: Agent, Session, Chat, History, Workspace, Skill Endpoints - Sessions/Agents anderer User sind nicht sichtbar/zugreifbar
This commit is contained in:
1 parent
9a59ae686d
commit
7614141760
10 files changed
+123
-45
No files matched your search
@@ -0,0 +1,11 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Gott.Extensions;
|
||||
|
||||
public static class HttpContextExtensions
|
||||
{
|
||||
public static string GetUserId(this HttpContext ctx)
|
||||
{
|
||||
return ctx.Items["UserId"] as string;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user