Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

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

Merged
JammingBen merged 3 commits into
masterfrom
resolve-private-links-on-shares
Oct 12, 2022
Merged

JammingBen merged 3 commits into
masterfrom
resolve-private-links-on-shares

Conversation

@kulmann

@kulmann kulmann commented Oct 11, 2022 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor 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.

@sonarqubecloud

Copy link
Copy Markdown

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

@JammingBen JammingBen left a comment

Copy link
Copy Markdown
Contributor

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

tbsbdr commented Oct 12, 2022

Copy link
Copy Markdown

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
8 of 13 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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