Skip to content

Hide "Shared by link" when sharing by link is disabled - #61724

Open
pboguslawski wants to merge 3 commits into
nextcloud:masterfrom
ibpl:master-IB#1156670
Open

Hide "Shared by link" when sharing by link is disabled#61724
pboguslawski wants to merge 3 commits into
nextcloud:masterfrom
ibpl:master-IB#1156670

Conversation

@pboguslawski

Copy link
Copy Markdown
Contributor

Summary

Related: #50323
Author-Change-Id: IB#1156670

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Related: nextcloud#50323
Author-Change-Id: IB#1156670
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
@pboguslawski
pboguslawski requested review from a team as code owners July 2, 2026 13:15
@pboguslawski
pboguslawski requested review from Altahrim, leftybournes, nfebe, sorbaugh and susnux and removed request for a team July 2, 2026 13:15
@susnux susnux added the community pull requests from community label Jul 3, 2026
Comment thread apps/files/lib/Controller/ViewController.php Outdated
Comment thread apps/files_sharing/src/files_views/shares.ts Outdated
Related: nextcloud#61724
Author-Change-Id: IB#1156670
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
Author-Change-Id: IB#1156670
Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
@pboguslawski

Copy link
Copy Markdown
Contributor Author

Switched to exisitng capability.

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@susnux

susnux commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Please adjust the code to comply with ESLint:

/home/runner/actions-runner/_work/server/server/build/frontend-legacy/apps/files_sharing/src/files_views/shares.ts
Error: 18:1 error Expected "@nextcloud/capabilities" (external) to come before "../services/SharingService.ts" (unknown) perfectionist/sort-imports

easiest: npm run lint:fix

@susnux susnux self-assigned this Jul 17, 2026
@susnux

susnux commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Also those tests are related and needs to be adjusted:

FAIL nextcloud-ui-legacy apps/files_sharing/src/files_views/shares.spec.ts > Sharing views definition > Shared with others view is not registered if user has no storage quota
TypeError: Cannot read properties of undefined (reading 'public')
❯ apps/files_sharing/src/files_views/shares.ts:85:24
83|
84| // Don't show this view if sharing by link is disabled.
85| if (getCapabilities().files_sharing.public.enabled) {
| ^
86| Navigation.register(new View({
87| id: sharingByLinksViewId,
❯ apps/files_sharing/src/files_views/shares.spec.ts:79:3

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯

FAIL nextcloud-ui-legacy apps/files_sharing/src/files_views/shares.spec.ts > Sharing views contents > Sharing overview get contents
TypeError: Cannot read properties of undefined (reading 'public')
❯ apps/files_sharing/src/files_views/shares.ts:85:24
83|
84| // Don't show this view if sharing by link is disabled.
85| if (getCapabilities().files_sharing.public.enabled) {
| ^
86| Navigation.register(new View({
87| id: sharingByLinksViewId,
❯ apps/files_sharing/src/files_views/shares.spec.ts:113:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: "Shared by link" displayed when sharing by link is disabled

2 participants