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

Shared file locking is not possible using different path #7599

Open
ScharfViktor opened this issue Oct 26, 2023 · 4 comments
Open

Shared file locking is not possible using different path #7599

ScharfViktor opened this issue Oct 26, 2023 · 4 comments
Labels

Comments

@ScharfViktor
Copy link
Contributor

Steps:

  • user creates file and shares file with edit permissions to einstein
  • einstein tries to lock file using: old, new, space dav
    curl -XLOCK "https://localhost:9200/remote.php/dav/remote.php/webdav/Shares/textfile.txt" -ueinstein:relativity -H "Content-Type: application/json" -H "timeout: Second-30" -d"<?xml version='1.0' encoding='UTF-8'?><d:lockinfo xmlns:d='DAV:'><d:lockscope><d:shared/></d:lockscope></d:lockinfo>" -vk

Expected: if it possible/needed user can lock file

Actual: 500 error <s:message>rpc error: code = Unimplemented desc = gateway: error calling SetLock: rpc error: code = Unimplemented desc = method not implemented</s:message>

locking shared file is possible using fileId in URL https://localhost:9200/dav/spaces/fileUUID

@micbar
Copy link
Contributor

micbar commented Dec 20, 2023

We should confirm that opening a shared file via WebOffice is working for both share receivers and public links.

That should use WOPI locks which should not be affected by this bug. Setting to p3.

@micbar micbar added the Priority:p3-medium Normal priority label Dec 20, 2023
@micbar micbar moved this from Qualification to Prio 3 or less in Infinite Scale Team Board Dec 20, 2023
@2403905
Copy link
Contributor

2403905 commented Feb 12, 2024

@ScharfViktor Are there any clients that use it?

@ScharfViktor
Copy link
Contributor Author

@ScharfViktor Are there any clients that use it?

I don't aware about it. So I wrote if it possible/needed user can lock file I really don't know, should we fix it or not. locking via fileUuid works fine

@anon-pradip
Copy link
Contributor

@ScharfViktor Are there any clients that use it?

I don't aware about it. So I wrote if it possible/needed user can lock file I really don't know, should we fix it or not. locking via fileUuid works fine

Same issue arises while trying in the Viewer and Secure viewer permission roles. This can be justified as:
For:

Scenario Outline: viewer cannot lock a file in the shares
    Given using <dav-path-version> DAV path
    And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
    And user "Alice" has sent the following resource share invitation:
      | resource        | textfile.txt       |
      | space           | Personal           |
      | sharee          | Brian              |
      | shareType       | user               |
      | permissionsRole | <permissions-role> |
    When user "Brian" tries to lock file "/Shares/textfile.txt" using the WebDAV API setting the following properties
      | lockscope | exclusive |
    Then the HTTP status code should be "403"
    Examples:
      | dav-path-version | permissions-role |
      | old              | Viewer           |
      | new              | Viewer           |
      | spaces           | Viewer           |
      | new              | Secure viewer    |
      | old              | Secure viewer    |
      | spaces           | Secure viewer    |

It is:
Actual: 500 error <s:message>rpc error: code = Unimplemented desc = gateway: error calling SetLock: rpc error: code = Unimplemented desc = method not implemented</s:message>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Prio 3 or less
Development

No branches or pull requests

4 participants