aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-03-14 12:04:41 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-03-14 12:04:41 +0200
commit1ebb6a67c93969f3d3822893d4e191d14f8fd3e3 (patch)
tree235f1d8bc8ca127d4ae2f4ee45ec0e527e1b9844 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication
parent37b740c1d128d694b9dcbc3669808435b5d88fec (diff)
downloadTango-1ebb6a67c93969f3d3822893d4e191d14f8fd3e3.tar.gz
Tango-1ebb6a67c93969f3d3822893d4e191d14f8fd3e3.zip
Fixed some issues with primary keys on db.
Implemented embroidery import Fit To Scale. Implemented assignment of user last login on machine studio login.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index bc57aee20..2fcf55d27 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -60,6 +60,16 @@ namespace Tango.MachineStudio.UI.Authentication
throw new AuthenticationException("It seems like you do not have sufficient privileges to run Machine Studio. Please contact your administrator.");
}
+ if (user != null)
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ var u = db.Users.Single(x => x.Guid == user.Guid);
+ u.LastLogin = DateTime.UtcNow;
+ db.SaveChanges();
+ }
+ }
+
CurrentUser = user;
return user;
}