aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share20
Commit message (Collapse)AuthorAgeFilesLines
* fix(dispatcher): Migrate to OCP event dispatcher before ↵Joas Schilling2023-06-021-1/+7
| | | | | | symfony/event-dispatcher upgrade Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix types for reading and writing config valuesjld31032023-04-051-4/+4
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* composer run cs:fixCôme Chilliet2023-01-205-8/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #34477 from ↵Joas Schilling2022-12-091-0/+7
|\ | | | | | | | | nextcloud/bugfix/noid/sharee-recommendations-show-group-id Show group name instead of group id as recommendation
| * Adjust unit testsJoas Schilling2022-10-121-0/+7
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix errors from PHP 8.2 testingCôme Chilliet2022-11-141-2/+4
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove deprecated at matcher from tests/libCôme Chilliet2022-08-291-142/+111
| | | | | | Only 15 warnings left in there Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix share manager testsJulien Veyssier2022-08-021-1/+28
| | | | Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
* Fix share attribute related tests + code styleVincent Petry2022-07-281-0/+3
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Add share attributes + prevent download permissionVincent Petry2022-07-282-1/+36
| | | | | | Makes it possible to store download permission Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix email shares not being shown to other usersRichard Steinmetz2022-06-171-0/+312
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Merge pull request #31194 from ↵Vincent Petry2022-04-061-0/+34
|\ | | | | | | | | nextcloud/feat/allow-to-exclude-groups-from-password-enforcement Allow to disable password policy enforcement for selected groups
| * Allow to disable password policy enforcement for selected groupsCarl Schwan2022-04-051-0/+34
| | | | | | | | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Co-authored-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* | Migrate from ILogger to LoggerInterface where needed in the testsCôme Chilliet2022-03-241-3/+3
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Check style updateCarl Schwan2022-01-132-65/+65
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add unit test for share enumeration methodJoas Schilling2021-11-091-1/+79
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move common logic to share managerJoas Schilling2021-11-091-10/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Admin Audit - Sharing: createShare - report the full pathszaimen2021-07-221-0/+1
| | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Merge pull request #26727 from nextcloud/group-exclude-link-shareMorris Jobke2021-05-211-10/+23
|\ | | | | Add option to exclude groups from creating link shares
| * load share settings from the share manager in more placesRobin Appelman2021-05-121-10/+23
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | l10n: Fix testValdnet2021-05-201-23/+23
|/
* Fix test by defining pluralsJoas Schilling2021-04-201-1/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Separate settings for remote share expirationVincent Petry2021-04-151-70/+207
| | | | | | | Added separate settings for default and enforced expiration date for remote shares. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* gracefully handle deleteFromSelf when share is already goneArthur Schiwon2021-03-301-3/+0
| | | | | | - handling race conditions Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix sharebymail testsJohn Molakvoæ (skjnldsv)2021-03-221-64/+64
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Remove duplicated query for email sharesDaniel Calviño Sánchez2021-03-221-63/+79
| | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
* Merge pull request #23718 from nextcloud/already-shared-error-messageRoeland Jago Douma2021-03-191-4/+13
|\ | | | | expand 'path is already shared' error message
| * expand 'path is already shared' error messageRobin Appelman2021-03-151-4/+13
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Update user share must use correct expiration validationVincent Petry2021-03-181-40/+40
| | | | | | | | | | | | | | | | | | | | | | Updating a user or group share now uses the correct method for the validation of the expiration date. Instead of using the one from links it uses the one for internal shares. To avoid future confusion, the method "validateExpirationDate" has been renamed to "validateExpirationDateLink". Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* | adjust testsRobin Appelman2021-01-261-3/+16
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* deleteChildren only returns arrayMaxence Lange2020-12-231-0/+4
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* Extend dummy factory in testsJulius Härtl2020-12-091-0/+6
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add unit tests for "validateExpirationDateInternal"Daniel Calviño Sánchez2020-11-161-0/+284
| | | | | | | They were copied and adjusted as needed from the tests for "validateExpirationDate". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add explicit time to test date for clarityDaniel Calviño Sánchez2020-11-121-3/+5
| | | | | | | This shows in a clearer way that the expected expiration date is the original one, but without time. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add unit test for expiration date with date and with defaultDaniel Calviño Sánchez2020-11-121-0/+28
| | | | | | | This adds back what was being actually tested in the unit test fixed in the previous commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for expiration date without date but with defaultDaniel Calviño Sánchez2020-11-121-7/+5
| | | | | | | | | The expiration date was explicitly given, so it was not testing what it should. Moreover, "link_defaultExpDays" needs to be mapped when testing the default value (even if it will just fallback to the value of "shareapi_expire_after_n_days"). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test method nameDaniel Calviño Sánchez2020-11-121-1/+1
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for verifying enforced valid expiration date.Daniel Calviño Sánchez2020-11-121-0/+1
| | | | | | | The enforced expiration date was not actually enabled, as for that "shareapi_default_expire_date" needs to be explicitly set to "yes". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix unit test for verifying enforced expire date too far in the futureDaniel Calviño Sánchez2020-11-121-8/+5
| | | | | | | | | | | | The test should fail if no exception was thrown, and no exception was thrown due to a missing configuration parameter. However, the use of "addToAssertionCount(1)" made the test pass even if no exception was thrown and, therefore, to silently fail. Now the missing configuration parameter was added and the test will fail if the expected exception is not thrown. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add unit tests to enforce a relaxed default share expiration dateDaniel Calviño Sánchez2020-11-121-0/+21
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Remove wrong and misleading commentDaniel Calviño Sánchez2020-11-121-2/+0
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Remove extra spacesDaniel Calviño Sánchez2020-11-121-10/+6
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix typo in variable nameDaniel Calviño Sánchez2020-11-121-129/+129
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix typos in method namesDaniel Calviño Sánchez2020-11-121-9/+9
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* use file name instead of path in 'not allowed to share' messageRobin Appelman2020-10-291-3/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-052-127/+127
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-123-18/+18
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use the correct mountpoint to calculateRoeland Jago Douma2020-07-091-0/+9
| | | | | | | If we use the owners mount point this results in null. And then the rest of the checks get called with null. Which doesn't work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update share type constant usageJoas Schilling2020-06-243-259/+260
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>