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

[full-ci] Resolve internal/private links on shares #7769

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Oct 11, 2022

Description

This PR adds the (a little bit hacky) ability to resolve private links / public links with "internal" role which point to files/folders within an accepted incoming share.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@kulmann kulmann self-assigned this Oct 11, 2022
if (matchingSpace) {
path = yield clientService.owncloudSdk.files.getPathForFileId(id)
resource = yield clientService.webdav.getFileInfo(matchingSpace, { path })
} else {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since reviewing renamed files is not such a good UX: the else block (+ 2 additional functions below) is new. getting path and resource for files within own spaces has been moved to the if block above. The rest is untouched.

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

17.0% 17.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

@JammingBen JammingBen merged commit 51c3114 into master Oct 12, 2022
@delete-merged-branch delete-merged-branch bot deleted the resolve-private-links-on-shares branch October 12, 2022 06:52
@tbsbdr
Copy link
Contributor

tbsbdr commented Oct 12, 2022

killer! this issue pains me every time I use public links on a known instance. its not just annoying but really contraproductive when it comes to establishing ocis as the single source of truth for data. awwwesome 🌟

@kulmann kulmann mentioned this pull request Oct 14, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve private links in oCIS Scoped links: Can't create private-ish links Scoped links
3 participants