aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Share20/ManagerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-131-17/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* test: adjust test to new permissions check logicRobin Appelman2024-05-031-6/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(tests): Fix tests when daytime saving time change happened recentlyCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(files_sharing): allow to specify allowed groups to share instead of ↵Corentin Damman2024-03-151-2/+9
| | | | | | | | excluded groups Relates to #3387 Signed-off-by: Corentin Damman <c.damman@intopix.com>
* refactor: make share manager buildableRobin Appelman2024-03-061-176/+19
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* perf: switch places that always use the first getById result to getFirstNodeByIdRobin Appelman2024-03-041-6/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat(share): save date and time for expirationBenjamin Gaussorgues2024-02-221-22/+76
| | | | | | | | 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>
* feat(php,vue): Create a new parameterBaptiste Fotia2024-01-311-0/+5
| | | | Signed-off-by: Baptiste Fotia <fotia.baptiste@hotmail.com>
* Merge pull request #39863 from nextcloud/sharing-mask-wrapperRobin Appelman2023-09-041-10/+25
|\ | | | | move share permission logic to storage wrapper
| * cleanup di for share permissions wrapperRobin Appelman2023-08-161-10/+25
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix tests, add test for the new featureCôme Chilliet2023-08-281-13/+77
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Remove legacy dispatcher from share managerJoas Schilling2023-07-281-15/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat!: Migrate unShare events to typed eventsJoas Schilling2023-07-281-34/+55
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat!: Migrate Sharing events to typed eventsJoas Schilling2023-07-281-30/+31
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Move Sharing events to IEventDispatcherJoas Schilling2023-07-271-2/+2
| | | | 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-201-4/+2
| | | | 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-281-1/+5
| | | | | | Makes it possible to store download permission Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* 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-131-62/+62
| | | | 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>
* 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>
* 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>
* 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>