aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Controller
Commit message (Collapse)AuthorAgeFilesLines
* chore: run rectorrector-phpunit10Robin Appelman8 days3-49/+31
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: apply new CSFixer rulesFerdinand Thiessen8 days6-129/+135
| | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> # Conflicts: # apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
* feat(files_sharing): allow viewing files with download disabledskjnldsv13 days1-16/+12
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* feat(files_sharing): show Account menu on public pagesskjnldsv2025-06-111-0/+2
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: use consistent casing for header names (required by openAPI)Ferdinand Thiessen2025-06-091-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* test(files_sharing): split `testCanAccessShare` into separate tests and fix ↵test/files-sharing-phpunitFerdinand Thiessen2025-06-021-36/+81
| | | | | | | | | | 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>
* test(files_sharing): adjust mocks of `Talk` classestest/fix-files-sharingFerdinand Thiessen2025-05-311-7/+19
| | | | | | | 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>
* test(files_sharing): adjust tests for PHPUnit v10Ferdinand Thiessen2025-05-312-16/+11
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(files_sharing): show note, label and list of uploaded files on file dropFerdinand Thiessen2025-05-261-2/+6
| | | | | | | | | 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>
* Merge pull request #52810 from ↵Louis2025-05-221-4/+12
|\ | | | | | | nextcloud/artonge/feat/do_not_require_samesite_strict_cookie_on_public.php
| * fix: Replace the deprecated direct download link with the public DAV endpointartonge/feat/do_not_require_samesite_strict_cookie_on_public.phpLouis Chemineau2025-05-211-4/+12
| | | | | | | | | | | | Follow-up of #48098 Signed-off-by: Louis Chemineau <louis@chmn.me>
* | refactor: move tag handling from files handler to files_sharingchore/remove-dead-code-filesFerdinand Thiessen2025-05-161-6/+44
|/ | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(files_sharing): add mime fallback to public preview toofix/mime-fallback-publicJohn Molakvoæ (skjnldsv)2025-05-131-1/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* fix(files_sharing): bring back owner and ownerDisplayName initial statefix/public-displayname-ownerskjnldsv2025-04-291-0/+4
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(lookup-server): disable lookup server for non-global scale setupsFerdinand Thiessen2025-03-111-6/+7
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(lookup-server): do not query data by defaultFerdinand Thiessen2025-03-111-1/+1
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(files_sharing): block downloading if neededfix/download-permsFerdinand Thiessen2025-02-181-0/+29
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Apply new rector configuration to apps folderCôme Chilliet2025-02-131-8/+8
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: re-apply current rector configuration to apps folderCôme Chilliet2025-02-131-58/+59
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(sharing): Ensure download restrictions are not droppedfix/proper-download-checkFerdinand Thiessen2025-02-041-69/+79
| | | | | | | | 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>
* fix(files_sharing): Respect permissions passed when creating link sharesFerdinand Thiessen2025-01-281-146/+155
| | | | | | | | | | | | | | | | | 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>
* chore: remove legacy action to test remote endpointBenjamin Gaussorgues2024-11-291-89/+0
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(files_sharing): Allow users with share permission to manage shares on ↵provokateurin2024-11-251-0/+124
| | | | | | IShareOwnerlessMount Signed-off-by: provokateurin <kate@provokateurin.de>
* feat(files_sharing): use share node or label as page titlefeat/sharing-titleskjnldsv2024-11-081-0/+3
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix: Adjust preview for view-only sharesfix/view-only-previewFerdinand Thiessen2024-10-281-10/+111
| | | | | | | | | | | | | | | | | 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>
* fix(files_sharing): Cleanup error messagesfix/files_sharing/cleanup-error-messagesprovokateurin2024-10-281-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(apps): Use constructor property promotion when possibleprovokateurin2024-10-211-3/+3
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixerdependabot/composer/vendor-bin/cs-fixer/nextcloud/coding-standard-1.3.2dependabot[bot]2024-10-191-1/+1
| | | | | | | | | | | | | | | | | 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>
* chore(apps): Apply new rector configuration to autouse classesCôme Chilliet2024-10-153-239/+245
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore: Apply rector configuration to apps folderCôme Chilliet2024-09-202-5/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* test: fix ShareControllerTest.phpobject-store-move-fixesRobin Appelman2024-09-181-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: fix ShareAPIControllerTest.phpRobin Appelman2024-09-181-1/+41
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Remove OCP\Files\Storage interface deprecated since version 9Côme Chilliet2024-09-161-16/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-156-99/+99
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(files_sharing): adjust permissions from custom edit and delete check methodsskjnldsv2024-09-111-0/+46
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* feat(files_sharing): Migrate public share to use Vue files listFerdinand Thiessen2024-09-061-350/+148
| | | | | | 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>
* refactor(IMenuAction): Make public menu actions use the new Vue UIFerdinand Thiessen2024-09-031-4/+2
| | | | | | | | 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>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-253-74/+74
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat(files_sharing): add public name prompt for files requestsskjnldsv2024-07-181-4/+10
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(files_sharing): phpunit & openapi fixesskjnldsv2024-07-121-17/+41
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: Add SPDX headerAndy Scherzinger2024-06-066-152/+16
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* refactor(shareApiController): use contrusctor property promotion & DI loggerfenn-cs2024-04-181-58/+40
| | | | Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
* fix(files_sharing): ShareesAPI - Return empty response when user is not ↵Ferdinand Thiessen2024-03-151-40/+74
| | | | | | | | allowed to share Resolves: https://github.com/nextcloud/server/issues/20950 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* perf: switch places that always use the first getById result to getFirstNodeByIdRobin Appelman2024-03-042-70/+101
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat(share): save date and time for expirationBenjamin Gaussorgues2024-02-221-0/+2
| | | | | | | | Because of timezones, not saving time can lead to unexpected behaviour when sharing an item sooner than timezone offset Example: sharing a file before 9am when in UTC+9 Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix: phpunitJohn Molakvoæ2024-02-131-2/+2
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* feat: rename users to account or personVincent Petry2024-02-131-2/+2
| | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* fix(share): use user timezone to parse share expiration dateBenjamin Gaussorgues2024-01-091-1/+15
| | | | | | | | If an user in UTC+1 try to create a share at 00:00, it's day D for him, but D-1 for the server (UTC). This fix aims to apply the correct offset Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-234-22/+21
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>