summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/MountProviderTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(files_sharing): phpunit & openapi fixesskjnldsv2024-07-121-10/+10
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: Add SPDX headerAndy Scherzinger2024-06-061-26/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Migrate files sharing to PSR LoggerInterfaceBenjamin Gaussorgues2023-07-061-8/+7
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Add SHARE_TYPE_SCIENCEMESHMichiel de Jong2023-03-081-3/+9
| | | | Signed-off-by: Michiel de Jong <michiel@unhosted.org>
* Fix share attribute related tests + code styleVincent Petry2022-07-281-3/+4
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Add share attributes + prevent download permissionVincent Petry2022-07-281-32/+65
| | | | | | Makes it possible to store download permission Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Remove at() matcher in files_sharing testsCôme Chilliet2022-05-241-38/+28
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* cache the verification of the share mountpointRobin Appelman2022-04-211-1/+6
| | | | | | after the initial verification this can only really be invalidated by a system mount (external/group/etc) being created at the share target since any normal file/folder creation will already conflict with the share Signed-off-by: Robin Appelman <robin@icewind.nl>
* add event for when a share is mountedRobin Appelman2021-08-241-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Adjust mountprovider testsJulius Härtl2020-12-091-1/+23
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* 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-5/+5
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update share type constant usageJoas Schilling2020-06-241-8/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-19/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-21/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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-2/+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>
* Add room shares to the MountProvider for sharesDaniel Calviño Sánchez2018-08-081-1/+23
| | | | | | | | The MountProvider for shares creates mount points for the files shared with the user, which makes possible to use the received shared files and folders as regular files and folders. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-241-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Some app fixes of phpstorm inspectionsRoeland Jago Douma2017-07-241-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #3884 from nextcloud/downstream-26956Joas Schilling2017-03-201-1/+21
|\ | | | | Skip null groups in group manager
| * Skip null groups in group manager (#26871) (#26956)Vincent Petry2017-03-171-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Skip null groups in group manager (#26871) * Skip null groups in group manager * Also skip null groups in group manager's search function * Add more group null checks in sharing code * Add unit tests for null group safety in group manager * Add unit tests for sharing code null group checks * Added tests for null groups handling in sharing code * Ignore moveShare optional repair in mount provider In some cases, data is inconsistent in the oc_share table due to legacy data. The mount provider might attempt to make it consistent but if the target group does not exist any more it cannot work. In such case we simply ignore the exception as it is not critical. Keeping the exception would break user accounts as they would be unable to use their filesystem. * Adjust null group handing + tests * Fix new group manager tests Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | shares-circlesMaxence Lange2017-03-171-0/+12
|/ | | Signed-off-by: Maxence Lange <maxence@nextcloud.com>
* Fix getMock files_sharingRoeland Jago Douma2016-09-061-5/+7
|
* Make share target consistent when grouping group share with user shareVincent Petry2016-08-031-4/+36
| | | | | | | | | | | | | | | | In some situations, a group share is created before a user share, and the recipient renamed the received share before the latter is created. In this situation, the "file_target" was already modified and the second created share must align to the already renamed share. To achieve this, the MountProvider now groups only by "item_source" value and sorts by share time. This makes it so that the least recent share is selected as super-share and its "file_target" value is then adjusted in all grouped shares. This fixes the issue where this situation would have different "file_target" values resulting in two shared folders appearing instead of one.
* Added more tests for sharing's MountProviderVincent Petry2016-08-031-0/+158
|
* Improved share grouping readability + fixed testVincent Petry2016-08-031-52/+47
|
* Fix apps/Joas Schilling2016-07-211-1/+4
|
* Fix PHPUnit 5.4 warnings in files_sharing testsRoeland Jago Douma2016-07-151-10/+10
|
* fix swift primary object store test (#25281)Thomas Müller2016-07-051-0/+3
| | | | | | | | | | | | | * Wait for socket to be open * Fix call on null * Allow DB access for MountProviderTest Makes unit tests pass when using object store, since their FS access is actually oc_filecache DB access. It is currently not possible to mock or bypass the logic from "SharedMount::verifyMountPoint()" triggered by this test.
* fix broken unit test (#25198)Thomas Müller2016-06-211-1/+8
|
* Filter out group shares for owner where owner is included (#25190)Vincent Petry2016-06-211-0/+129