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 REQUEST] Select correct user and navigate to the correct file when opening via deep link #4194

Closed
10 tasks done
manuelplazaspalacio opened this issue Oct 18, 2023 · 2 comments · Fixed by #4212
Closed
10 tasks done
Assignees
Labels
Estimation - 8 (XL) Feature request p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@manuelplazaspalacio
Copy link
Contributor

manuelplazaspalacio commented Oct 18, 2023

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
@jesmrec
Copy link
Collaborator

jesmrec commented Oct 19, 2023

@JuancaG05
Copy link
Collaborator

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
Labels
Estimation - 8 (XL) Feature request p2-high Escalation, on top of current planning, release blocker
Projects
None yet
4 participants