aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Controller
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix unit tests on PHP 8.3Joas Schilling2023-10-161-0/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix unit testsJoas Schilling2023-10-121-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Convert isset ternary to null coalescing operatorHamid Dehnavi2023-09-281-2/+2
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* files_sharing: Add OpenAPI specjld31032023-07-311-6/+0
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* fix: adjust testingJohn Molakvoæ2023-07-111-32/+88
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Migrate files sharing to PSR LoggerInterfaceBenjamin Gaussorgues2023-07-061-3/+0
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Add SHARE_TYPE_SCIENCEMESHMichiel de Jong2023-03-081-2/+2
| | | | Signed-off-by: Michiel de Jong <michiel@unhosted.org>
* Pluggable share providerLouis Chemineau2023-02-021-1/+24
| | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Louis Chemineau <louis@chmn.me>
* Honor permissions of new link share via OCS APIJan-Philipp Litza2022-12-061-4/+4
| | | | | | | | | | | The API currently overrides the supplied permissions with "read only" when a file is shared via link. It allows to update the permissions later, however. This keeps the default to "read only" but honors the permissions supplied by API call if any. Signed-off-by: Jan-Philipp Litza <jpl@plutex.de>
* More fixesCarl Schwan2022-10-181-8/+18
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Small progress with fixing unit testsCarl Schwan2022-10-111-167/+82
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Only normalize data in public shares and not crudCarl Schwan2022-09-081-3/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Multiple fixesCarl Schwan2022-07-311-43/+144
| | | | | | | | | | | - Fix tests - Use non deprecated event stuff - Add a bit of type hinting to the new stuff - More safe handling of instanceOfStorage (share might not be the first wrapper) - Fix resharing Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix share attribute related tests + code styleVincent Petry2022-07-281-9/+25
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>