diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-25 17:53:18 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-02-25 17:53:18 +0200 |
| commit | 1128b73f79d5aa28de3bf9da2a6492281cc8446e (patch) | |
| tree | 2d7960151653b5bcec14cd424a885fd838d27784 /Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs | |
| parent | 0523d927f31acc3be070fa6281c3108aaefe65c2 (diff) | |
| download | Tango-1128b73f79d5aa28de3bf9da2a6492281cc8446e.tar.gz Tango-1128b73f79d5aa28de3bf9da2a6492281cc8446e.zip | |
Moved observablesStaticCollection init to auth provider.
Implemented Logout/Login.
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs | 43 |
1 files changed, 23 insertions, 20 deletions
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<InternalModule>(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<InternalModule>(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<InternalModule>(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<InternalModule>(nameof(SettingsView)); + }) + { + Name = "Settings", + Index = 2, + Description = "Configuration of your Tango FSE", + Image = ResourceHelper.GetImageFromResources("Images/Menu/settings.png"), + }); + } } } } |
