aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Controller/ShareControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Migrate files sharing to PSR LoggerInterfaceBenjamin Gaussorgues2023-07-061-3/+0
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Pluggable share providerLouis Chemineau2023-02-021-1/+24
| | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Louis Chemineau <louis@chmn.me>
* Remove at() matcher in files_sharing testsCôme Chilliet2022-05-241-15/+36
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Adds a "Request password" button to the public share authentication page for ↵Cyrille Bollu2022-04-111-0/+4
| | | | | | | | | | | | | | | | | | shares of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. Users accessing non-anonymous public shares (TYPE_EMAIL shares) can now request a temporary password themselves. - Creates a migration step for the files_sharing app to add the 'password_expiration_time' attribute to the oc_shares table. - Makes share temporary passwords' expiration time configurable via a system value. - Adds a system config value to allow permanent share passwords -Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue See https://github.com/nextcloud/server/issues/31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
* Revert "Add non-breaking space in the file size"szaimen2022-02-101-4/+4
| | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* Add non-breaking space in the file sizeCarl Schwan2022-01-141-4/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Emit event on link share actionJohn Molakvoæ2021-09-101-3/+3
| | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
* Use product name in places where it is appropriate rather than the instance nameJulius Härtl2021-06-161-1/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Map old account scope properties to new namesVincent Petry2021-03-261-4/+4
| | | | | | | | Use new scope values in settings page. Adjust all consumers to use the new constants. Map old scope values to new ones in account property getter. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Return correct error message on share download without read permissionMorris Jobke2020-10-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Show filename on share link downloadJohn Molakvoæ (skjnldsv)2020-09-171-17/+21
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add BeforeTemplateRenderedEvent for files_sharingJulius Härtl2020-07-151-12/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+3
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-13/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add a test and fix the existing onesJoas Schilling2020-04-011-29/+220
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-6/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Disable link shares of disabled usersRoeland Jago Douma2020-02-071-6/+134
| | | | | | Fixes #10869 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-051-2/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-3/+3
| | | | | | | | | | | * 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>
* Include the share in the Files_Sharing::loadAdditionalScripts eventDaniel Calviño Sánchez2019-10-171-2/+12
| | | | | | | | This provides a better context for apps using the event, for example to load one script or another depending on whether the share is a file or a folder. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Rollback to default list viewJohn Molakvoæ (skjnldsv)2018-11-151-3/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix unit testsMorris Jobke2018-11-071-1/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Adapts the code to the new master stateMichael Weimann2018-11-071-1/+2
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Hides the header actions for file dropsMichael Weimann2018-11-071-3/+100
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Fix testsJohn Molakvoæ (skjnldsv)2018-11-061-2/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Honour "hide download" in the public share pageDaniel Calviño Sánchez2018-10-301-0/+114
| | | | | | | | | | | | | When the "hide download" property of a share is set the public share page will not show the download button nor the menu with the download, direct link and "Add to your Nextcloud" actions; the "downloadURL" hidden field will not be included either in the generated HTML. Despite that, note that the "downloadURL" parameter is still set and passed to the template, as this could be needed anyway to generate previews (for example, of audio files). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Expose hide download to public pageRoeland Jago Douma2018-10-301-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* fix unit testsBjoern Schiessle2018-07-211-0/+5
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Fix ShareControllerTestRoeland Jago Douma2018-06-201-210/+16
| | | | | | | * Removed tests that are now handled by the middleware * Updated tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsJulius Härtl2018-04-051-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fixup! fixup! Sharing: redirect to download after authentification if requestedJohn Molakvoæ (skjnldsv)2018-03-011-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* fixup! Fixed testsJohn Molakvoæ (skjnldsv)2018-02-281-2/+32
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed testsJohn Molakvoæ (skjnldsv)2018-02-281-5/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix files_sharing testsJulius Härtl2018-02-271-4/+30
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Change @georgehrke's emailMorris Jobke2017-11-061-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocks of dav appMorris Jobke2017-10-261-2/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-241-10/+16
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix testsRoeland Jago Douma2017-09-251-1/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adjust existing bruteforce protection codeLukas Reschke2017-04-141-0/+1
| | | | | | | - Moves code to annotation - Adds the `throttle()` call on the responses on existing annotations Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Move OC_Defaults to OCP\DefaultsMorris Jobke2017-04-091-1/+1
| | | | | | | | | | | | | * currently there are two ways to access default values: OCP\Defaults or OC_Defaults (which is extended by OCA\Theming\ThemingDefaults) * our code used a mixture of both of them, which made it hard to work on theme values * this extended the public interface with the missing methods and uses them everywhere to only rely on the public interface Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move files_sharing Controllers => ControllerRoeland Jago Douma2016-10-241-0/+502
lib/Controller is the default location for controllers. So lets put them all in there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>