aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Controller/PublicPreviewControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-06-061-21/+2
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Fix tests on PHP 8.1 for encryption, files_sharing, files_version,Côme Chilliet2021-12-161-0/+4
| | | | | | files_trashbin and theming apps Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-2/+2
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersChristoph Wurst2019-12-051-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-0/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove unused import Punic\DataDaniel Kesselberg2019-10-261-1/+0
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Harden public preview testsRoeland Jago Douma2019-04-161-1/+10
| | | | | | This way there are less timing issues. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add caching headers for public previewsJulius Härtl2019-01-021-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix PublicPreviewControllerTestsRoeland Jago Douma2018-06-201-8/+10
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* More testsRoeland Jago Douma2016-11-031-0/+193
* PreviewController test * PublicPreview test * Versions Preview test * Trash Preview test Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>