From 743e1197aeda8f63350e5974747bb7ebab41148a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0vihl=C3=ADk?= Date: Sat, 24 Feb 2024 17:38:19 +0100 Subject: [PATCH] removed release conflicts --- src/WopiHost.Cobalt/CobaltHostLockingStore.cs | 2 +- src/WopiHost.FileSystemProvider/WopiFile.cs | 8 +- .../WopiHost.FileSystemProvider.csproj | 95 +++++++++---------- .../WopiSecurityHandler.cs | 8 +- 4 files changed, 56 insertions(+), 57 deletions(-) diff --git a/src/WopiHost.Cobalt/CobaltHostLockingStore.cs b/src/WopiHost.Cobalt/CobaltHostLockingStore.cs index 2db9121..b57cdd0 100644 --- a/src/WopiHost.Cobalt/CobaltHostLockingStore.cs +++ b/src/WopiHost.Cobalt/CobaltHostLockingStore.cs @@ -175,7 +175,7 @@ public override GetCoauthoringStatusRequest.OutputType HandleGetCoauthoringStatu return result; } - public override Dictionary QueryEditorsTable() => new Dictionary(); + public override Dictionary QueryEditorsTable() => new(); public override JoinEditingSessionRequest.OutputType HandleJoinEditingSession(JoinEditingSessionRequest.InputType input) { diff --git a/src/WopiHost.FileSystemProvider/WopiFile.cs b/src/WopiHost.FileSystemProvider/WopiFile.cs index 4f8a9b5..e348654 100644 --- a/src/WopiHost.FileSystemProvider/WopiFile.cs +++ b/src/WopiHost.FileSystemProvider/WopiFile.cs @@ -80,10 +80,10 @@ public string Owner { return FileInfo.GetAccessControl().GetOwner(typeof(NTAccount)).ToString(); } - else if (OperatingSystem.IsLinux()) - { - return Mono.Unix.UnixFileSystemInfo.GetFileSystemEntry(FilePath).OwnerUser.UserName; //TODO: test - } + //else if (OperatingSystem.IsLinux()) + //{ + // return Mono.Unix.UnixFileSystemInfo.GetFileSystemEntry(FilePath).OwnerUser.UserName; //TODO: test + //} else { return "UNSUPPORTED_PLATFORM"; diff --git a/src/WopiHost.FileSystemProvider/WopiHost.FileSystemProvider.csproj b/src/WopiHost.FileSystemProvider/WopiHost.FileSystemProvider.csproj index 7291f74..ac15785 100644 --- a/src/WopiHost.FileSystemProvider/WopiHost.FileSystemProvider.csproj +++ b/src/WopiHost.FileSystemProvider/WopiHost.FileSystemProvider.csproj @@ -1,54 +1,53 @@  - - WopiHost.FileSystemProvider Class Library - Petr Svihlik - net8.0 - WopiHost.FileSystemProvider - WopiHost.FileSystemProvider - LICENSE.txt - logo.png - WOPI;MS-WOPI;MS-FSSHTTP;Office Online Server;Office Web Apps;Web Application Open Platform Interface - git - https://github.com/petrsvihlik/WopiHost.git - false - false - false - false - false - false - bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml - - - - - - - - - true - true - snupkg - true - + + WopiHost.FileSystemProvider Class Library + Petr Svihlik + net8.0 + WopiHost.FileSystemProvider + WopiHost.FileSystemProvider + LICENSE.txt + logo.png + WOPI;MS-WOPI;MS-FSSHTTP;Office Online Server;Office Web Apps;Web Application Open Platform Interface + git + https://github.com/petrsvihlik/WopiHost.git + false + false + false + false + false + false + bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml + - - - - - - - - - - - - - - + + + + - - - + + true + true + snupkg + true + + + + + + + + + + + + + + + + + + + diff --git a/src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs b/src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs index 20bc6e7..e7fc837 100644 --- a/src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs +++ b/src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs @@ -43,12 +43,12 @@ private SymmetricSecurityKey Key new ClaimsPrincipal( new ClaimsIdentity(new List { - new Claim(ClaimTypes.NameIdentifier, "12345"), - new Claim(ClaimTypes.Name, "Anonymous"), - new Claim(ClaimTypes.Email, "anonymous@domain.tld"), + new(ClaimTypes.NameIdentifier, "12345"), + new(ClaimTypes.Name, "Anonymous"), + new(ClaimTypes.Email, "anonymous@domain.tld"), //TDOO: this needs to be done per file - new Claim(WopiClaimTypes.USER_PERMISSIONS, (WopiUserPermissions.UserCanWrite | WopiUserPermissions.UserCanRename | WopiUserPermissions.UserCanAttend | WopiUserPermissions.UserCanPresent).ToString()) + new(WopiClaimTypes.USER_PERMISSIONS, (WopiUserPermissions.UserCanWrite | WopiUserPermissions.UserCanRename | WopiUserPermissions.UserCanAttend | WopiUserPermissions.UserCanPresent).ToString()) }) ) }