Skip to content

[FEATURE REQUEST] Select correct user and navigate to the correct file when opening via deep link #4194

Closed

Description

@manuelplazaspalacio

Describe the solution you'd like
Things to do:

  • Select the user owner of the file between the logged users if the user is not logged show the login view.
  • When the user is selected, navigate to the file with id contained in the deep link.
  • Show error if no user for the file.
  • Show error if file couldn't be finde in the user account.

Additional context
Spike related: #4068

oC10 link / fileid resolve

% curl -sI -u "test:test" "https://demo.owncloud.com/f/9" | grep "location"
location: /apps/files/?dir=/Photos
webdav-location: /remote.php/dav/files/test/Photos

oCIS link / fileid resolve

/remote.php/dav/meta/ could be used to get more information.

% curl -s 'https://ocis.ocis-traefik.latest.owncloud.works/remote.php/dav/meta/427a5e74-6921-4768-8d53-cd5e8b30f5b0%24534bb038-6f9d-4093-946f-133be61fa4e7!a130bbe3-5681-4193-9ab0-2a714934722a' \
-X 'PROPFIND' \
-H 'Authorization: Bearer REDACTED' \
-H 'Depth: 0' \
--data-binary $'<?xml version="1.0"?>\n<d:propfind  xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n  <d:prop>\n    <oc:meta-path-for-user />\n  </d:prop>\n</d:propfind>' | xmllint --format -

<?xml version="1.0"?>
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/meta/427a5e74-6921-4768-8d53-cd5e8b30f5b0$534bb038-6f9d-4093-946f-133be61fa4e7%21a130bbe3-5681-4193-9ab0-2a714934722a/</d:href>
    <d:propstat>
      <d:prop>
        <oc:meta-path-for-user>/Hacker-Songs</oc:meta-path-for-user>
        <oc:id>427a5e74-6921-4768-8d53-cd5e8b30f5b0$534bb038-6f9d-4093-946f-133be61fa4e7!a130bbe3-5681-4193-9ab0-2a714934722a</oc:id>
        <oc:fileid>427a5e74-6921-4768-8d53-cd5e8b30f5b0$534bb038-6f9d-4093-946f-133be61fa4e7!a130bbe3-5681-4193-9ab0-2a714934722a</oc:fileid>
        <oc:spaceid>427a5e74-6921-4768-8d53-cd5e8b30f5b0</oc:spaceid>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

TASKS

  • Research (if needed)
  • Create branch feature/select_user_navigate_file_deep_link
  • Development tasks
    • Create the call to check the location of the file
    • Manage the possible errors
    • Navigate to the file
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/select_user_navigate_file_deep_link into master

Activity

  1. self-assigned this
    on Nov 15, 2023
  2. added
    p2-high
    on Nov 23, 2023
  3. JuancaG05 commented on Nov 28, 2023

    @JuancaG05
    Contributor

    Finally, we'll ask the /remote.php/dav/meta/ endpoint to resolve the fileId in oC10 as well:

    oC10 link / fileid resolve

    % curl -s 'https://demo.owncloud.com/remote.php/dav/meta/56' \
    -u 'demo:demo' \
    -X 'PROPFIND' \
    -H 'Depth: 0' \
    --data-binary $'<?xml version="1.0"?>\n<d:propfind  xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">\n<d:prop>\n<oc:meta-path-for-user />\n</d:prop>\n</d:propfind>' | xmllint --format -
    
    <?xml version="1.0"?>
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
      <d:response>
        <d:href>/remote.php/dav/meta/56/</d:href>
        <d:propstat>
          <d:prop>
            <oc:meta-path-for-user>/Photos</oc:meta-path-for-user>
          </d:prop>
          <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
      </d:response>
    </d:multistatus>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Estimation - 8 (XL)Feature requestp2-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions