aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web
diff options
context:
space:
mode:
authorRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-07 06:47:24 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-09-07 06:47:24 +0300
commit9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e (patch)
treeea0617d8dc1a4e83439a65b32e8720ab78a5c973 /Software/Visual_Studio/Web
parent2ff424e4b00ed154ae5febd1827d0d31d69c34ad (diff)
downloadTango-9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e.tar.gz
Tango-9ba1902ee9dbac3b3c48d735b3bbcc3ba867dd2e.zip
Added seesion, chat history on ADX...
Diffstat (limited to 'Software/Visual_Studio/Web')
-rw-r--r--Software/Visual_Studio/Web/Tango.Portal/Controllers/HomeController.cs8
-rw-r--r--Software/Visual_Studio/Web/Tango.Portal/Models/SessionUser.cs4
2 files changed, 10 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));
}
diff --git a/Software/Visual_Studio/Web/Tango.Portal/Models/SessionUser.cs b/Software/Visual_Studio/Web/Tango.Portal/Models/SessionUser.cs
index e38f11c77..83323b0ad 100644
--- a/Software/Visual_Studio/Web/Tango.Portal/Models/SessionUser.cs
+++ b/Software/Visual_Studio/Web/Tango.Portal/Models/SessionUser.cs
@@ -12,5 +12,9 @@ namespace Tango.Portal.Models
public String Name { get; set; }
public bool IsTwineUser { get; set; }
+ public string Email { get; set; }
+ public string Organization { get; set; }
+ public string FullName { get; set; }
+ public DateTime Expires { get; set; }
}
} \ No newline at end of file