aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.UI
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-11-25 16:49:13 +0200
committerRoy <Roy.mail.net@gmail.com>2022-11-25 16:49:13 +0200
commit810a75cac71a86452d553a5d06f83fca44f9c0a1 (patch)
tree9159765c1da22a51ee74a917cb17d7bf8af7a76b /Software/Visual_Studio/FSE/Tango.FSE.UI
parent12db705d26e4737bb4b12bd1e1980d473871c121 (diff)
downloadTango-810a75cac71a86452d553a5d06f83fca44f9c0a1.tar.gz
Tango-810a75cac71a86452d553a5d06f83fca44f9c0a1.zip
Fixed issue with RSM module authorization.
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/FSEApplication/DefaultFSEApplicationManager.cs2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/InternalModule.cs2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Modules/DefaultFSEModuleLoader.cs2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs3
4 files changed, 5 insertions, 4 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/FSEApplication/DefaultFSEApplicationManager.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/FSEApplication/DefaultFSEApplicationManager.cs
index 3524e4c0e..2b5db8487 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/FSEApplication/DefaultFSEApplicationManager.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/FSEApplication/DefaultFSEApplicationManager.cs
@@ -285,7 +285,7 @@ namespace Tango.FSE.UI.FSEApplication
_moduleLoader.UserModules.Remove(module);
}
- if (_authenticationProvider.CurrentUser.HasPermission(module.Permission))
+ if (_authenticationProvider.CurrentUser.HasAnyPermission(module.Permission))
{
_moduleLoader.UserModules.Add(module);
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/InternalModule.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/InternalModule.cs
index 8b391ff82..4c779fe7a 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/InternalModule.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/InternalModule.cs
@@ -16,7 +16,7 @@ namespace Tango.FSE.UI
public override string Name { get; } = "Internal Module";
public override string Description { get; } = "Internal Module";
public override Type MainViewType { get; } = typeof(InternalModuleView);
- public override Permissions Permission { get; } = Permissions.FSE_RunFSE;
+ public override Permissions[] Permission { get; } = new Permissions[] { Permissions.FSE_RunFSE, Permissions.TwineRSMAccess };
public override void Dispose()
{
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Modules/DefaultFSEModuleLoader.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Modules/DefaultFSEModuleLoader.cs
index 712d350f2..248e153dd 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Modules/DefaultFSEModuleLoader.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Modules/DefaultFSEModuleLoader.cs
@@ -147,7 +147,7 @@ namespace Tango.FSE.UI.Modules
if (_authenticationProvider.CurrentUser != null)
{
- UserModules = AllModules.Where(x => _authenticationProvider.CurrentUser.HasPermission(x.Permission)).ToObservableCollection();
+ UserModules = AllModules.Where(x => _authenticationProvider.CurrentUser.HasAnyPermission(x.Permission)).ToObservableCollection();
}
ModulesLoaded?.Invoke(this, new EventArgs());
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 0f2316e26..8f11f4dfb 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/InternalModuleViewVM.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.BL.Enumerations;
using Tango.FSE.Common;
using Tango.FSE.Common.Navigation;
using Tango.FSE.UI.Views;
@@ -14,7 +15,7 @@ namespace Tango.FSE.UI.ViewModels
{
public override void OnApplicationReady()
{
- if (AuthenticationProvider.CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_RunFSE))
+ if (AuthenticationProvider.CurrentUser.HasAnyPermission(Permissions.FSE_RunFSE, Permissions.TwineRSMAccess))
{
//NavigationManager.MenuItems.Add(new NavigationMenuItem(() =>
//{