owncloud / ocis

:atom_symbol: ownCloud Infinite Scale Stack
https://doc.owncloud.com/ocis/next/
Apache License 2.0
1.39k stars 182 forks source link

Shared file locking is not possible using different path #7599

Open ScharfViktor opened 1 year ago

ScharfViktor commented 1 year ago

Steps:

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 commented 10 months ago

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.

2403905 commented 8 months ago

@ScharfViktor Are there any clients that use it?

ScharfViktor commented 8 months ago

@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 commented 4 months ago

@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 rpc error: code = Unimplemented desc = gateway: error calling SetLock: rpc error: code = Unimplemented desc = method not implemented</s:message>