aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-01-16 14:30:46 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-01-16 14:30:46 +0200
commite87626ffc0298426d8242c2453a6992d94f38e1f (patch)
treeece78d9d788b2b5f9d19d1a007ae87198c8bfcb4 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
parent1ee11bc9771c807c4d0ecb4d73e4bc33b307ae1e (diff)
downloadTango-e87626ffc0298426d8242c2453a6992d94f38e1f.tar.gz
Tango-e87626ffc0298426d8242c2453a6992d94f38e1f.zip
Fixed issue with cached tokens when authenticating users in machine service with AD.
Improved Login View.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs17
1 files changed, 17 insertions, 0 deletions
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;
+ /// <summary>
+ /// Gets or sets a value indicating whether to enable the deployment slot selection.
+ /// </summary>
+ public bool EnableSlotSelection
+ {
+ get { return _enableSlotSelection; }
+ set { _enableSlotSelection = value; RaisePropertyChangedAuto(); }
+ }
+
+
/// <summary>
/// Gets or sets the login command.
/// </summary>
@@ -100,6 +111,8 @@ namespace Tango.MachineStudio.UI.ViewModels
/// <param name="notificationProvider">The notification provider.</param>
public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider, IEventLogger eventLogger)
{
+ EnableSlotSelection = true;
+
_settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
_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)