diff options
| author | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-07 06:47:24 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-07 06:47:24 +0300 |
| commit | 9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e (patch) | |
| tree | ea0617d8dc1a4e83439a65b32e8720ab78a5c973 /Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs | |
| parent | 2ff424e4b00ed154ae5febd1827d0d31d69c34ad (diff) | |
| download | Tango-9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e.tar.gz Tango-9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e.zip | |
Added seesion, chat history on ADX...
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs index dff8a140e..38eaaf4b3 100644 --- a/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs +++ b/Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs @@ -171,8 +171,9 @@ namespace Tango.Portal.Controllers public ActionResult AI() { if (!SessionUser.IsTwineUser) return RedirectToAction(nameof(Login)); - String session = SimpleCryptoHelper.Encrypt(JsonConvert.SerializeObject(new { UserName = SessionUser.Name, Expires = DateTime.UtcNow.AddHours(1) })); - return new RedirectResult($"https://ai.twine-srv.com?session={session}"); + SessionUser.Expires = DateTime.UtcNow.AddHours(1); + String json = SimpleCryptoHelper.Encrypt(JsonConvert.SerializeObject(SessionUser)); + return new RedirectResult($"https://ai.twine-srv.com?session={json}"); } public ActionResult Docs() @@ -241,6 +242,9 @@ namespace Tango.Portal.Controllers SessionUser.IsAuthenticated = true; SessionUser.IsTwineUser = user.Organization.Name == "Twine"; SessionUser.Name = user.Contact.FirstName; + SessionUser.FullName = user.Contact.FullName; + SessionUser.Email = user.Email; + SessionUser.Organization = user.Organization.Name; return RedirectToAction(nameof(Index)); } |
