Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/199 PutUserInfo #200

Merged
merged 5 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 22 additions & 39 deletions WOPI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B692B58D
test\Directory.Packages.props = test\Directory.Packages.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost", "sample\WopiHost\WopiHost.csproj", "{21B81530-CC57-46F1-9524-08F984187DE2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Discovery", "src\WopiHost.Discovery\WopiHost.Discovery.csproj", "{84B896D2-1A87-4671-B583-92A6AF3645F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Abstractions", "src\WopiHost.Abstractions\WopiHost.Abstractions.csproj", "{D3B3947E-94DD-4FCD-BDDC-4E579ACF9B5B}"
Expand All @@ -40,8 +38,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Url", "src\WopiHos
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.FileSystemProvider.Tests", "test\WopiHost.FileSystemProvider.Tests\WopiHost.FileSystemProvider.Tests.csproj", "{650A5A85-5956-491E-9312-5E25A27D1108}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Web", "sample\WopiHost.Web\WopiHost.Web.csproj", "{5C301182-6FB2-40C5-97ED-58B07A910BFF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Discovery.Tests", "test\WopiHost.Discovery.Tests\WopiHost.Discovery.Tests.csproj", "{4089410A-8A12-455C-862B-A4A3834C3100}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WopiHost.Url.Tests", "test\WopiHost.Url.Tests\WopiHost.Url.Tests.csproj", "{9FFB3975-2DE6-4944-92C7-7062C39BB8FA}"
Expand All @@ -59,29 +55,16 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WopiHost.Validator", "sample\WopiHost.Validator\WopiHost.Validator.csproj", "{97442113-B773-4F71-8B60-EF5599AC135D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
ProjectSection(SolutionItems) = preProject
sample\README.md = sample\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wopi-docs", "wopi-docs", "{EA1A15F6-C3AF-4AAF-9A8B-4B7E053D6CEC}"
ProjectSection(SolutionItems) = preProject
sample\wopi-docs\test.docx = sample\wopi-docs\test.docx
sample\wopi-docs\test.html = sample\wopi-docs\test.html
sample\wopi-docs\test.pptx = sample\wopi-docs\test.pptx
sample\wopi-docs\test.wopitest = sample\wopi-docs\test.wopitest
sample\wopi-docs\test.xlsx = sample\wopi-docs\test.xlsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "subfolder", "subfolder", "{1CCBC8E4-5688-4F95-ADE8-31BF49064828}"
ProjectSection(SolutionItems) = preProject
sample\wopi-docs\subfolder\test2.docx = sample\wopi-docs\subfolder\test2.docx
sample\wopi-docs\subfolder\TextFile.txt = sample\wopi-docs\subfolder\TextFile.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "subsubfolder", "subsubfolder", "{7EC2D8B4-42A4-40E2-AC9A-E4496DA57F4C}"
ProjectSection(SolutionItems) = preProject
sample\wopi-docs\subfolder\subsubfolder\SubSubTextFile.txt = sample\wopi-docs\subfolder\subsubfolder\SubSubTextFile.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WopiHost", "sample\WopiHost\WopiHost.csproj", "{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WopiHost.Web", "sample\WopiHost.Web\WopiHost.Web.csproj", "{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -91,14 +74,6 @@ Global
Release|Mixed Platforms = Release|Mixed Platforms
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{21B81530-CC57-46F1-9524-08F984187DE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Release|Any CPU.Build.0 = Release|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{21B81530-CC57-46F1-9524-08F984187DE2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{84B896D2-1A87-4671-B583-92A6AF3645F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84B896D2-1A87-4671-B583-92A6AF3645F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84B896D2-1A87-4671-B583-92A6AF3645F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -139,14 +114,6 @@ Global
{650A5A85-5956-491E-9312-5E25A27D1108}.Release|Any CPU.Build.0 = Release|Any CPU
{650A5A85-5956-491E-9312-5E25A27D1108}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{650A5A85-5956-491E-9312-5E25A27D1108}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Release|Any CPU.Build.0 = Release|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5C301182-6FB2-40C5-97ED-58B07A910BFF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4089410A-8A12-455C-862B-A4A3834C3100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4089410A-8A12-455C-862B-A4A3834C3100}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4089410A-8A12-455C-862B-A4A3834C3100}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -211,15 +178,29 @@ Global
{97442113-B773-4F71-8B60-EF5599AC135D}.Release|Any CPU.Build.0 = Release|Any CPU
{97442113-B773-4F71-8B60-EF5599AC135D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{97442113-B773-4F71-8B60-EF5599AC135D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Release|Any CPU.Build.0 = Release|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Release|Any CPU.Build.0 = Release|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F66706B6-D7DD-48FB-963C-870B3D611500} = {785E1533-48CE-4B5E-8C59-D6F1FDA8C45C}
{21B81530-CC57-46F1-9524-08F984187DE2} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{650A5A85-5956-491E-9312-5E25A27D1108} = {B692B58D-1720-49A8-9CB8-5562894618F6}
{5C301182-6FB2-40C5-97ED-58B07A910BFF} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{4089410A-8A12-455C-862B-A4A3834C3100} = {B692B58D-1720-49A8-9CB8-5562894618F6}
{9FFB3975-2DE6-4944-92C7-7062C39BB8FA} = {B692B58D-1720-49A8-9CB8-5562894618F6}
{9CBB4AD4-EAE4-4D85-A70C-ECC465DA3D86} = {B692B58D-1720-49A8-9CB8-5562894618F6}
Expand All @@ -228,6 +209,8 @@ Global
{EA1A15F6-C3AF-4AAF-9A8B-4B7E053D6CEC} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{1CCBC8E4-5688-4F95-ADE8-31BF49064828} = {EA1A15F6-C3AF-4AAF-9A8B-4B7E053D6CEC}
{7EC2D8B4-42A4-40E2-AC9A-E4496DA57F4C} = {1CCBC8E4-5688-4F95-ADE8-31BF49064828}
{A0D7E71F-8940-4D2E-5BDE-E82A8DEAE605} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{750ECE28-6B96-8C09-67E1-CDBE48EC16A6} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {91B6EE44-4505-4272-9D80-E4C73B09BF25}
Expand Down
13 changes: 6 additions & 7 deletions src/WopiHost.Abstractions/WopiFileOperations.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WopiHost.Abstractions;
namespace WopiHost.Abstractions;

/// <summary>
/// Details all WOPI file operation keywords
Expand Down Expand Up @@ -41,6 +35,11 @@ public static class WopiFileOperations
/// </summary>
public const string PutRelativeFile = "PUT_RELATIVE";

/// <summary>
/// https://learn.microsoft.com/microsoft-365/cloud-storage-partner-program/rest/files/putuserinfo
/// </summary>
public const string PutUserInfo = "PUT_USER_INFO";

/// <summary>
/// Cobalt file operations
/// </summary>
Expand Down
5 changes: 4 additions & 1 deletion src/WopiHost.Abstractions/WopiHostCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class WopiHostCapabilities : IWopiHostCapabilities
public bool SupportsCoauth { get; set; }

/// <inheritdoc/>
/// <remarks>set by FilesController.ctor depending on registered DI services</remarks>
public bool SupportsCobalt { get; set; }

/// <inheritdoc/>
Expand All @@ -18,9 +19,11 @@ public class WopiHostCapabilities : IWopiHostCapabilities
public bool SupportsContainers { get; set; } = true;

/// <inheritdoc/>
/// <remarks>set by FilesController.ctor depending on registered DI services</remarks>
public bool SupportsLocks { get; set; }

/// <inheritdoc/>
/// <remarks>set by FilesController.ctor depending on registered DI services</remarks>
public bool SupportsGetLock { get; set; }

/// <inheritdoc/>
Expand Down Expand Up @@ -54,5 +57,5 @@ public class WopiHostCapabilities : IWopiHostCapabilities
public bool SupportsDeleteFile { get; set; }

/// <inheritdoc/>
public bool SupportsUserInfo { get; set; }
public bool SupportsUserInfo { get; set; } = true;
}
Loading