From 70444a5e8db15a474caea5a6fb9d093263fec51a Mon Sep 17 00:00:00 2001 From: Roy Date: Sun, 27 Nov 2022 10:20:48 +0200 Subject: Fixes last bugs on RSM. --- .../FileSystem/DefaultFileSystemProvider.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs') diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs index 344adafe8..534fb3a8c 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/FileSystem/DefaultFileSystemProvider.cs @@ -16,6 +16,7 @@ using Tango.Core.Threading; using Tango.FileSystem; using Tango.FileSystem.Network; using Tango.FSE.Common.Authentication; +using Tango.FSE.Common.Build; using Tango.FSE.Common.Connection; using Tango.FSE.Common.FileSystem; using Tango.FSE.Common.Notifications; @@ -48,6 +49,9 @@ namespace Tango.FSE.UI.FileSystem [TangoInject] private IAuthenticationProvider AuthenticationProvider { get; set; } + [TangoInject(Mode = TangoInjectMode.WhenAvailable)] + private IBuildProvider BuildProvider { get; set; } + #region Properties private bool _enableWebRTC; @@ -590,13 +594,16 @@ namespace Tango.FSE.UI.FileSystem /// Could not locate the local file or directory to upload. public Task Upload(String localSourcePath, String remotePath, bool forRemoteUpgrade = false) { - if (!forRemoteUpgrade) + if (!BuildProvider.IsTwineRSM) { - AuthenticationProvider.ThrowIfNoPermission(Permissions.FSE_PPCFileSystemWrite); - } - else - { - AuthenticationProvider.ThrowIfNoPermission(Permissions.FSE_RemoteUpgradeOnline); + if (!forRemoteUpgrade) + { + AuthenticationProvider.ThrowIfNoPermission(Permissions.FSE_PPCFileSystemWrite); + } + else + { + AuthenticationProvider.ThrowIfNoPermission(Permissions.FSE_RemoteUpgradeOnline); + } } String operationId = String.Empty; -- cgit v1.3.1