Commit graph

608 commits

Author SHA1 Message Date
Kent Delante
33a0051ac3 fix(files_sharing): remove filename's leading slash on unshare toast
Signed-off-by: Kent Delante <kent@delante.me>
2026-07-09 10:14:02 +08:00
Git'Fellow
5592116fef
fix(files,files_sharing): swallow redirected navigation errors
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-06-17 21:01:56 +02:00
nfebe
06636d2ad0 fix(files_sharing): Drop permissions on unmounted pending and deleted shares
Pending and deleted shares are not mounted into the user's filesystem, so
generic file operations like delete or download produced a misleading
"file is not available" error.

These shares now carry no permissions, so every permission-aware action
hides itself automatically, without the files app having to special-case
each view. Conversion additionally requires read permission, matching the
server-side readability check.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-06-17 18:59:47 +01:00
Kent Delante
942f2c6e8b fix(files_sharing): clear the password after saving
fix(files_sharing): clear the password after saving

Signed-off-by: Kent Delante <kent@delante.me>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-06-03 12:12:21 +00:00
Ferdinand Thiessen
00a9510792
fix(files_sharing): do not double escape special characters
- fixes https://github.com/nextcloud/server/issues/60163

The strings are already escaped by Vue so no need to escape in the
translation method, this will cause double escaping.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-19 19:22:55 +02:00
Daniel Calviño Sánchez
4f58d490d1 fix: Fix error when creating mail shares if custom tokens are enabled
When a new share is saved it is first created in the backend and then
updated with some additional attributes set in the frontend. If custom
tokens are enabled the attributes to update also include the token.
However, for new shares the token is set by the backend when it is
created, it is not defined by the frontend, so the token returned by the
backend needs to be copied to the share data in the frontend. Otherwise
the update would fail because an empty token is sent.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2026-05-18 16:21:35 +02:00
Peter Ringelmann
1ef5b1bb5a fix(files_sharing): apply link share password on first save
Pre-declare newPassword on the share state so Vue 2's reactivity covers
it from the start. Without this, $set later relies on a
property-addition notification path that races with the toggle's async
setter and intermittently drops the password in certain build
environments.

Fixes: #57011
-e
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
2026-05-12 14:54:58 +02:00
nfebe
7b264136ae fix(files_sharing): Restore password guard return for new public shares
The password guard now blocks the save when a new public share is

missing a password. Non-public shares (user/group) are never blocked

by this guard, so they remain unaffected.

Tests invoke the real saveShare method against a stubbed context and

cover the save-twice symptom and the non-public-share regression.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-04-23 20:09:57 +01:00
Ferdinand Thiessen
3e8ac3338a
chore: fix ESLint issues for rules added in ESLint v10
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-20 23:10:06 +02:00
skjnldsv
ef0dae9342 fix(files_sharing): do not prevent share creation if password is enabled but not supported by the current share type
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2026-03-27 16:00:52 +00:00
nfebe
9d3311006c fix(sharing): Prevent generated password from overwriting user input
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-03-24 16:41:45 +01:00
nfebe
11fb0de07e fix(sharing): Prevent empty password when checkbox is enabled
Set passwordProtectedState explicitly when initializing shares with
default passwords. This ensures the checkbox state is tracked
independently of the password value, preventing it from unchecking
when the password field is cleared.

Also block saving new shares when password protection is enabled but
no password is entered, regardless of enforcement settings.

Added passWithNoTests to vitest configs to handle Vue 2/3 dual
frontend test runs gracefully.

Fixes: #57732, #57011
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-03-24 16:41:45 +01:00
Ferdinand Thiessen
b56e0d5ad5 fix(files_sharing): allow strict validation of shares
API response sometimes includes `null` for unset, but unset
(`undefined`) is something different than `null`.
So if `null` is passed we mean `undefined` instead.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-03-17 12:21:32 +00:00
Daniel Kesselberg
5b260e6361
fix(sharing): remove external shares from view on delete
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2026-03-04 12:00:19 +01:00
Ferdinand Thiessen
b298ecb3b6
fix(files_sharing): ensure the server share API errors are shown
- fix https://github.com/nextcloud/server/issues/58359

To reproduce:
1. Setup password policy.
2. Try to set a share password like `1234`
3. See that no visual error message is show but only in the console

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-20 10:25:57 +01:00
Ferdinand Thiessen
319375002b fix(files_sharing): adjust for @nextcloud/files v4
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-11 19:14:45 +00:00
Ferdinand Thiessen
41b6f6012d
test: remove testing internal of libraries and test only app code
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-10 15:32:09 +01:00
Ferdinand Thiessen
31dd2acf13
refactor(files_sharing): adjust note to recipient files header
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-10 15:32:01 +01:00
Ferdinand Thiessen
859e325549
refactor(files_sharing): adjust for files library interfaces and remove sideeffects
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-06 14:03:00 +01:00
nfebe
f626b8fe05 feat(sharing): Make share permission in bundled edit configurable
Add config option shareapi_bundle_reshare_with_edit to include reshare
permission in "Allow editing" bundle. Default is true to maintain
backward compatibility.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-02-05 09:10:14 +00:00
Ferdinand Thiessen
44917b5ef1
chore(legacy): fix @stylistic/exp-list-style ESLint rule
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-26 00:03:51 +01:00
Ferdinand Thiessen
903aab54b4 feat(files): render filters in top bar
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-23 10:05:51 +00:00
nfebe
2cdbd7fa15 fix(sharing): strip share permission before comparing to bundled perms
Handle backward compatibility when config.defaultPermissions includes
the SHARE permission (value 31) which was previously part of
BUNDLED_PERMISSIONS.ALL. Now that ALL no longer includes SHARE, the
comparison must strip SHARE before checking against bundled permissions.

This fixes an issue where the Advanced Settings section would be
auto-expanded for new shares, causing a toggle to close it instead
of opening it.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-01-20 19:30:47 +01:00
nfebe
8526999ad5 feat(sharing): remove share permission from "Allow editing" default
Remove PERMISSION_SHARE from bundled permissions for ALL and ALL_FILE.
Update quick share selector to consistently strip share permission
when comparing, ensuring backwards compatibility with existing shares.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-01-20 19:30:47 +01:00
Ferdinand Thiessen
d3813798bf
chore: update @nextcloud/files to v4.0.0-rc.0
- update library
- adjust sidebar tab handling

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-16 22:22:57 +01:00
Robin Appelman
de286709f8 feat: hide "External Shares" section if no external shares can be created
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-08 11:49:02 +00:00
Ferdinand Thiessen
f9a137ea87
refactor(files): migrate favorite sidebar action to new Sidebar API
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-05 02:23:15 +01:00
Ferdinand Thiessen
7077685bf8
refactor(files_sharing): migrate to new Files Sidebar API
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-05 02:23:15 +01:00
Ferdinand Thiessen
9919c2bc91
chore(files): adjust getContents to use AbortController
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-12-23 21:08:33 +01:00
Ferdinand Thiessen
77f9897060
chore(files): adjust code for breaking change of Navigation.setActive
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-12-23 20:17:34 +01:00
Ferdinand Thiessen
ec617b6b3e fix(files_sharing): ensure that external section is mounted
Make sure the external section is mounted before trying to assign it the
node prop.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-12-19 16:25:34 +00:00
skjnldsv
492bdb7010
chore: update @nextcloud/files to 4.0.0
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-12-11 12:44:16 +01:00
nfebe
13df65850e fix(files_sharing): Normalize dir type to folder for federated shares
The backend returns type 'dir' for folders (from FileInfo::TYPE_FOLDER),
but the frontend expects 'folder'. This mismatch caused federated shared
folders to display incorrectly as files in the "Shared with you" view.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-12-11 10:49:41 +01:00
nfebe
08382282ea fix(sharing): allow federated shares to non-trusted servers
When `showFederatedSharesToTrustedServersAsInternal` is enabled, the
trusted server filter was incorrectly applied to both internal and
external sharing sections. This prevented users from sharing with
federated users on non-trusted servers via the external share UI.

The filter now only applies to the internal section, allowing
non-trusted federated shares to appear in the external section.

Fixes: https://github.com/nextcloud/server/issues/56622

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-12-10 17:41:11 +01:00
nfebe
8e7cbcea40 fix(files_sharing): Allow removing password from link shares
Fixes regression from a28834b163

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-12-08 12:42:57 +01:00
Ferdinand Thiessen
f1d28332a6 chore: manually adjust event names (update:checked to update:modelValue)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-25 16:25:54 +01:00
Ferdinand Thiessen
42112c8d30 chore: auto fix ESLint issues
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-25 16:25:54 +01:00
skjnldsv
d32878e6db fix(files_sharing): sidebar link share password checkbox
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-11-18 04:59:03 +00:00
Ferdinand Thiessen
0059d17ae3
refactor(files_trashbin): migrate app to Vue 3
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-14 17:01:21 +01:00
Ferdinand Thiessen
85b6a0628d
fix(files_sharing): use webroot for public links
Regression of https://github.com/nextcloud/server/pull/55750

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-13 20:36:40 +01:00
Luka Trovic
f0cfb52439 fix(sharing): clean old federation shares when select another file/folder
Signed-off-by: Luka Trovic <luka@nextcloud.com>
2025-11-06 09:50:23 +01:00
Andy Scherzinger
67b8be5926 style(icons): Replace icon with outline variant
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-10-27 16:29:55 +01:00
nfebe
a28834b163 fix(files_sharing): Only send password on change
The password param should never be sent if the intention is not
remove it or update it.

This commit adapts the frontend and backend to this rule to avoid weird bugs
especially around updating new shares.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-10-21 16:54:55 +01:00
Ferdinand Thiessen
7fbc2ca25e feat: add new link endpoint when using globalscale
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-15 18:58:10 +00:00
Ferdinand Thiessen
2b39cb49ab
refactor: adjust code for breaking changes in @nextcloud/dialogs v7
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-15 13:45:12 +02:00
Ferdinand Thiessen
23be816568 chore!(files_sharing): remove deprecated OCA.Sharing.ExternalLinkActions
This API was deprecated in Nextcloud 23.
It was replaced with `OCA.Sharing.ExternalShareAction` which now have a proper API
by using `registerSidebarAction` from `@nextcloud/sharing` instead.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-14 13:34:54 +02:00
Maksim Sukharev
a4d440e1f0 fix(files_sharing): correctly handle error in case of failing share creation
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
2025-10-14 09:27:05 +02:00
nfebe
c1d9e22c51 fix(sharing): Adapt share suggestions to match trusted servers configs
When `show_federated_shares_to_trusted_servers_as_internal` is enabled
but `show_federated_shares_as_internal` is not, filter federated share
suggestions to only include trusted servers. Previously, searching for
an email address would suggest non-trusted federated servers.

Resolved: #54511
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-10-09 06:53:46 +01:00
Ferdinand Thiessen
ca65cf72d8
chore: add missing import of the logger
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-02 13:19:43 +02:00
Ferdinand Thiessen
91f3b6b4ee
chore: adjust code to new codestyle
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-10-02 13:19:42 +02:00