From e87626ffc0298426d8242c2453a6992d94f38e1f Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 16 Jan 2019 14:30:46 +0200 Subject: Fixed issue with cached tokens when authenticating users in machine service with AD. Improved Login View. --- .../Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs index 4ebf3d96d..c8e25e2d4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -87,6 +87,17 @@ namespace Tango.MachineStudio.UI.ViewModels set { _rememberMe = value; RaisePropertyChangedAuto(); } } + private bool _enableSlotSelection; + /// + /// Gets or sets a value indicating whether to enable the deployment slot selection. + /// + public bool EnableSlotSelection + { + get { return _enableSlotSelection; } + set { _enableSlotSelection = value; RaisePropertyChangedAuto(); } + } + + /// /// Gets or sets the login command. /// @@ -100,6 +111,8 @@ namespace Tango.MachineStudio.UI.ViewModels /// The notification provider. public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider, IEventLogger eventLogger) { + EnableSlotSelection = true; + _settings = SettingsManager.Default.GetOrCreate(); _notificationProvider = notificationProvider; @@ -137,6 +150,8 @@ namespace Tango.MachineStudio.UI.ViewModels await Task.Factory.StartNew(() => { + + _settings.DeploymentSlot = DeploymentSlot; _authenticationProvider.Login(Email, Password); @@ -151,6 +166,8 @@ namespace Tango.MachineStudio.UI.ViewModels _settings.Save(); _eventLogger.Log("User logged in."); + + EnableSlotSelection = false; }); } catch (Exception ex) -- cgit v1.3.1