From 1128b73f79d5aa28de3bf9da2a6492281cc8446e Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 25 Feb 2020 17:53:18 +0200 Subject: Moved observablesStaticCollection init to auth provider. Implemented Logout/Login. --- .../ViewModels/InternalModuleViewVM.cs | 43 ++++++++++++---------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs') diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs index 3a8a3c940..d682cf178 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs @@ -12,29 +12,32 @@ namespace Tango.FSE.UI.ViewModels { public class InternalModuleViewVM : FSEViewModel { - public override void OnApplicationStarted() + public override void OnApplicationReady() { - NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + if (AuthenticationProvider.CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.RunPPC)) { - NavigationManager.NavigateTo(nameof(AccountView)); - }) - { - Name = "Account", - Index = -1, - Description = "Manage your account details", - Image = ResourceHelper.GetImageFromResources("Images/Menu/account.png"), - }); + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { + NavigationManager.NavigateTo(nameof(AccountView)); + }) + { + Name = "Account", + Index = -1, + Description = "Manage your account details", + Image = ResourceHelper.GetImageFromResources("Images/Menu/account.png"), + }); - NavigationManager.MenuItems.Add(new NavigationMenuItem(() => - { - NavigationManager.NavigateTo(nameof(SettingsView)); - }) - { - Name = "Settings", - Index = 2, - Description = "Configuration of your Tango FSE", - Image = ResourceHelper.GetImageFromResources("Images/Menu/settings.png"), - }); + NavigationManager.MenuItems.Add(new NavigationMenuItem(() => + { + NavigationManager.NavigateTo(nameof(SettingsView)); + }) + { + Name = "Settings", + Index = 2, + Description = "Configuration of your Tango FSE", + Image = ResourceHelper.GetImageFromResources("Images/Menu/settings.png"), + }); + } } } } -- cgit v1.3.1