Skip to content

Commit

Permalink
removed release conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
petrsvihlik committed Feb 24, 2024
1 parent 9c70c40 commit 743e119
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 57 deletions.
2 changes: 1 addition & 1 deletion src/WopiHost.Cobalt/CobaltHostLockingStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public override GetCoauthoringStatusRequest.OutputType HandleGetCoauthoringStatu
return result;
}

public override Dictionary<string, EditorsTableEntry> QueryEditorsTable() => new Dictionary<string, EditorsTableEntry>();
public override Dictionary<string, EditorsTableEntry> QueryEditorsTable() => new();

public override JoinEditingSessionRequest.OutputType HandleJoinEditingSession(JoinEditingSessionRequest.InputType input)
{
Expand Down
8 changes: 4 additions & 4 deletions src/WopiHost.FileSystemProvider/WopiFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
95 changes: 47 additions & 48 deletions src/WopiHost.FileSystemProvider/WopiHost.FileSystemProvider.csproj
Original file line number Diff line number Diff line change
@@ -1,54 +1,53 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>WopiHost.FileSystemProvider Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.FileSystemProvider</AssemblyName>
<PackageId>WopiHost.FileSystemProvider</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>WOPI;MS-WOPI;MS-FSSHTTP;Office Online Server;Office Web Apps;Web Application Open Platform Interface</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/petrsvihlik/WopiHost.git</RepositoryUrl>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="" />
<None Include="..\..\img\logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup>
<Description>WopiHost.FileSystemProvider Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.FileSystemProvider</AssemblyName>
<PackageId>WopiHost.FileSystemProvider</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIcon>logo.png</PackageIcon>
<PackageTags>WOPI;MS-WOPI;MS-FSSHTTP;Office Online Server;Office Web Apps;Web Application Open Platform Interface</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/petrsvihlik/WopiHost.git</RepositoryUrl>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Mono.Unix" Version="7.1.0-final.1.21458.1" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="" />
<None Include="..\..\img\logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WopiHost.Abstractions\WopiHost.Abstractions.csproj" />
</ItemGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.3.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WopiHost.Abstractions\WopiHost.Abstractions.csproj" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/WopiHost.FileSystemProvider/WopiSecurityHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ private SymmetricSecurityKey Key
new ClaimsPrincipal(
new ClaimsIdentity(new List<Claim>
{
new Claim(ClaimTypes.NameIdentifier, "12345"),
new Claim(ClaimTypes.Name, "Anonymous"),
new Claim(ClaimTypes.Email, "[email protected]"),
new(ClaimTypes.NameIdentifier, "12345"),
new(ClaimTypes.Name, "Anonymous"),
new(ClaimTypes.Email, "[email protected]"),

//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())
})
)
}
Expand Down

0 comments on commit 743e119

Please sign in to comment.