diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-14 00:39:20 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-11-14 00:39:20 +0200 |
| commit | 4613356b6a9898f7c61f3f17cf82e933b8077cee (patch) | |
| tree | cba1d625304ee726fdf4def37287c6fcd2710222 /Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs | |
| parent | ac99f9c47f1342467e2a4cb4b4253f9d1cac975c (diff) | |
| download | Tango-4613356b6a9898f7c61f3f17cf82e933b8077cee.tar.gz Tango-4613356b6a9898f7c61f3f17cf82e933b8077cee.zip | |
Implemented all roles and permissions for configuration module.
Diffstat (limited to 'Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs index 24a0cbc42..19617c347 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs @@ -31,6 +31,19 @@ namespace Tango.FSE.MachineConfiguration.ViewModels get { return _selectedView; } set { + if (value == NavigationView.DataStoreView) + { + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreRead)) + { + Task.Delay(500).ContinueWith((x) => + { + SelectedView = _selectedView; + NotificationProvider.ShowError("The current user profile does not allow accessing the data store.\nPlease contact your administrator."); + }); + return; + } + } + _selectedView = value; RaisePropertyChangedAuto(); } |
