Commit Graph

232 Commits (7fbc2ca25ed8bd4befbfa6bbe87f244300e45b76)

Author SHA1 Message Date
Carl Schwan cb82a9ef04 refactor(preview): Cleanup a bit the public interface
* Remove old IProvider interface, it's been deprecated since 17.0.0 (8
  years)
* Add type hinting to the IPreview interface and mark it as consumeable
  only
* Remove unused arguments from GeneratorHelper

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-09 17:41:13 +07:00
Daniel Kesselberg 83a691709c
refactor: use IEmailValidator.isValid instead of IMailer.validateEmailAddress
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-10-04 21:54:22 +07:00
Côme Chilliet f4993de065
fix(tests): Turn data providers into static methods in files_sharing tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-09-27 13:05:33 +07:00
Louis Chemineau 6d672c4cba fix(encryption): Correctly set encrypted to 0 when copying
If encryption got disabled, copying should set encrypted to 0 for the
 new unencrypted copy. For instance when using encryption:decrypt-all

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-09-04 12:13:45 +07:00
Carl Schwan 5835599fa1 chore(rector): Apply current rector config
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2025-08-26 16:27:26 +07:00
nfebe 2bb8c72c47 feat(files_sharing): Toggle display for trusted server shares
Signed-off-by: nfebe <fenn25.fn@gmail.com>
2025-07-29 13:24:49 +07:00
Ferdinand Thiessen a18e61a1e5
feat(files_sharing): add config option for extending link-share permissions
This allows the admin to control the behavior whether link shares with
READ permissions should be extended to also gain SHARE permissions,
allowing users (public share receivers) to add the share to their cloud.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-07-17 16:59:36 +07:00
Robin Appelman aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
skjnldsv 9806a9830c feat(files_sharing): allow viewing files with download disabled
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-06-26 11:47:53 +07:00
skjnldsv bf3ce79abd feat(files_sharing): show Account menu on public pages
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-06-11 16:43:53 +07:00
Ferdinand Thiessen 495c364268
chore: use consistent casing for header names (required by openAPI)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-06-09 19:24:26 +07:00
Ferdinand Thiessen 9d8c2cd096
test(files_sharing): split `testCanAccessShare` into separate tests and fix for PHPUnit 10
- split the test into individual test cases
- fix invalid call to `onConsecutiveCalls` (it was called more than
  defined values and is deprecated in v10 anyways).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-06-02 13:20:53 +07:00
Ferdinand Thiessen 3a99b88917
test(files_sharing): adjust mocks of `Talk` classes
Classes need to exist to be mocked (reflection), thus unknown classes
only can be mocked as `stdClass`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-31 22:39:37 +07:00
Ferdinand Thiessen 7115658327
test(files_sharing): adjust tests for PHPUnit v10
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-31 22:22:52 +07:00
Ferdinand Thiessen 60ccc85e76
fix(files_sharing): show note, label and list of uploaded files on file drop
This was missing from the Vue migration of the public share view:
- Show the note as the description of the file drop
- Show the label as the heading of the file drop if available
- Show list of uploaded files for verification

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-26 15:11:36 +07:00
Louis a48bc55e2a
Merge pull request #52810 from nextcloud/artonge/feat/do_not_require_samesite_strict_cookie_on_public.php 2025-05-22 10:30:16 +07:00
Louis Chemineau ec1db0c32a
fix: Replace the deprecated direct download link with the public DAV endpoint
Follow-up of #48098

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-05-21 16:01:54 +07:00
Ferdinand Thiessen 4a9dc6c64d
refactor: move tag handling from files handler to files_sharing
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:09:03 +07:00
John Molakvoæ (skjnldsv) cd6a53ea4d fix(files_sharing): add mime fallback to public preview too
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2025-05-13 18:28:54 +07:00
skjnldsv bcc8de0c9d fix(files_sharing): bring back owner and ownerDisplayName initial state
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-29 21:25:47 +07:00
Ferdinand Thiessen 00d08a4f69
fix(lookup-server): disable lookup server for non-global scale setups
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-11 14:26:47 +07:00
Ferdinand Thiessen 34251c4375
fix(lookup-server): do not query data by default
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-11 14:26:47 +07:00
Ferdinand Thiessen c19ce403f3
fix(files_sharing): block downloading if needed
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-18 11:58:12 +07:00
Côme Chilliet 64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +07:00
Côme Chilliet ed5b7ae161
chore: re-apply current rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:45:33 +07:00
Ferdinand Thiessen 73dc0f0f19
fix(sharing): Ensure download restrictions are not dropped
When a user receives a share with share-permissions but also with
download restrictions (hide download or the modern download permission attribute),
then re-shares of that share must always also include those restrictions.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-04 15:39:14 +07:00
Ferdinand Thiessen 253f4345f1
fix(files_sharing): Respect permissions passed when creating link shares
Given:
User creates a link or email share with permissions=4 (create only = file drop).

Problem:
Currently the permissions are automatically extended to permissions = 5
(READ + CREATE). Work around was to create the share and directly update
it.

Solution:
Respect what the user is requesting, create a file drop share.

Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-28 16:40:50 +07:00
Benjamin Gaussorgues 5581f0c7bf
chore: remove legacy action to test remote endpoint
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-11-29 11:14:37 +07:00
provokateurin beea8854ca
feat(files_sharing): Allow users with share permission to manage shares on IShareOwnerlessMount
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +07:00
skjnldsv 4d9d617c84 feat(files_sharing): use share node or label as page title
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-11-08 14:20:58 +07:00
Ferdinand Thiessen c84c256261
fix: Adjust preview for view-only shares
Previously there was a different behavior for public shares (link-shares) and internal shares,
if the user disabled the view permission.
The legacy UI for public shares simply "disabled" the context menu and hided all download actions.
With Nextcloud 31 all share types use the consistent permissions attributes,
which simplifies code, but caused a regression: Images can no longer been viewed.

Because on 30 and before the attribute was not set, previews for view-only files
were still allowed. Now with 31 we need a new way to allow "viewing" shares.

So this is allowing previews for those files, but only for internal usage.
This is done by settin a special header, which only works with custom requests,
and not by opening the URL directly.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-28 15:52:27 +07:00
provokateurin aacb3ddc1e
fix(files_sharing): Cleanup error messages
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-28 09:07:41 +07:00
provokateurin 381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +07:00
dependabot[bot] bb598c8451
chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-19 07:57:35 +07:00
Côme Chilliet 1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +07:00
Côme Chilliet 1a4978c4ea
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-20 17:51:00 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Robin Appelman 1ad58d68f3 test: fix ShareControllerTest.php
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-18 16:10:14 +07:00
Robin Appelman 7661a7e90a test: fix ShareAPIControllerTest.php
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-18 16:10:14 +07:00
Côme Chilliet 801733e523
fix: Remove OCP\Files\Storage interface deprecated since version 9
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:10:48 +07:00
Christoph Wurst 49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +07:00
skjnldsv bb37954abb fix(files_sharing): adjust permissions from custom edit and delete check methods
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-09-11 13:17:42 +07:00
Ferdinand Thiessen 96c8275586
feat(files_sharing): Migrate public share to use Vue files list
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-06 03:38:42 +07:00
Ferdinand Thiessen 4d2556d4cf
refactor(IMenuAction): Make public menu actions use the new Vue UI
This removes custom rendering code an replaces it with the declarative menu actions.
Also adjust the template to allow the Vue UI to mount.
Custom entries still are possible.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-09-03 16:07:49 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
skjnldsv f28d933acc feat(files_sharing): add public name prompt for files requests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-18 20:15:39 +07:00
skjnldsv 967b3848e0 fix(files_sharing): phpunit & openapi fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
Andy Scherzinger 1e04619675
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 22:53:41 +07:00
fenn-cs 9a0913afdc refactor(shareApiController): use contrusctor property promotion & DI logger
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-04-18 02:01:08 +07:00