Commit Graph

63 Commits (3bdb3442242aba93d0fae6181861baeb60b1514d)

Author SHA1 Message Date
Carl Schwan 3bdb344224
perf(external-sharing): Port to Entity and SnowflakeId
This removes all the read after write and we don't need to queries all
the time the same share in the same request anymore.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-16 10:40:07 +07:00
Ferdinand Thiessen 65135bba31
chore: move behat dependencies to vendor-bin
So we do not have 3 locatations to look for PHP dependencies.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-12-10 01:13:50 +07:00
Daniel Calviño Sánchez e4d58d35fa test: Add integration tests for getting user and mail collaborators
The OCS endpoint expects either an int or an array for "shareType".
However, when using "getRowsHash()" only a single key is taken into
account, so instead of:
  | shareType[] | 0 |
  | shareType[] | 4 |
the share types are provided in a single row like:
  | shareTypes | 0 4 |
and then converted to "shareType[]=0&shareType[]=4" when sending the
request.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-11-11 00:54:36 +07:00
Daniel Calviño Sánchez 27b57b8c86 test: Fix getting returned sharees when there are several results
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-11-11 00:54:35 +07:00
Daniel Calviño Sánchez a164ab84d6 test: Check unique display name if provided in the response
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-11-11 00:54:34 +07:00
Ferdinand Thiessen a18e61a1e5
feat(files_sharing): add config option for extending link-share permissions
This allows the admin to control the behavior whether link shares with
READ permissions should be extended to also gain SHARE permissions,
allowing users (public share receivers) to add the share to their cloud.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-07-17 16:59:36 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
skjnldsv 6a0d92dedf fix(files_sharing): expireDate null tests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-04-14 22:46:52 +07:00
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
skjnldsv 9b84831c8d fix(files_sharing): adjust IAttributes API and files_versions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
fenn-cs d41d885713 test(Sharing): Integration test for no expiration set date for share
- Verify that explicitly sending empty `expireDate` param to server overwrite default
and sets not expiry date, if non is enforced.

- Update tests to avoid converting empty string to date.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-23 14:11:34 +07:00
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
John Molakvoæ 82b5a19a35
fix: public dav and files_sharing testing fixes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-01-09 10:56:14 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Côme Chilliet 7b93a143c8
Fix check in integration tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:12 +07:00
Vincent Petry c1df72fc8b
Fix copy in view-only mode
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-26 14:18:47 +07:00
Vincent Petry e9a344a644
Add int test for view-only download
Asserts that downloading a view-only document returns 403.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-26 14:18:47 +07:00
Côme Chilliet 540832e15e
Fix PHP Notices in build/integration/features/bootstrap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-25 17:25:15 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Daniel Calviño Sánchez 7817f8578b Generalize integration test steps to download last share
Note that the "last link share can be downloaded" step was kept as it
tests the "url" property specific of link shares.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 02:46:12 +07:00
Daniel Calviño Sánchez 6e49d3bb94 Remove unused variables
The step names were adjusted accordingly.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-29 02:46:12 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst bcd13296de
Make sure every file ends with an empty newline
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:11:50 +07:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +07:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +07:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst 23eb0462e5
Use lowercase true, false and null constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 21:53:04 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Daniel Calviño Sánchez 54f8f75f6f Accept incoming shares in integration tests
Now all incoming shares need to be explicitly accepted before being able
to use the shared file or get information about a reshare (although
getting the information of the incoming share is possible before
accepting it).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-11-20 15:47:11 +07:00
Daniel Calviño Sánchez eaa98ed343 Add integration tests for getting shares including subfiles
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 18:37:36 +07:00
Daniel Calviño Sánchez bb9814d052 Replace fully qualified name with alias
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 10:48:38 +07:00
Daniel Calviño Sánchez a7526d74ae
Do not expect a 200 HTTP status code when updating a share
This will be needed to test scenarios in which updating a share return a
different HTTP status code, like 401.

The assertion for the 200 HTTP status code was added in those scenarios
that tested updating a share (that is, those that were also checking the
OCS status code), but not in those in which updating a share was just a
preparatory step for the actual test (in the same way that the HTTP
status code is not checked in those tests when creating a share).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-04 19:25:10 +07:00
Arthur Schiwon 437b33ff63
add LDAP integr. test for receiving share candidates with group limitation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-06-14 06:23:58 +07:00
Julius Härtl 771ad85f85
Add integration tests for updating folder shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-04-16 15:03:52 +07:00
John Molakvoæ (skjnldsv) 49d0f0c499
Fixed phpunit Test class
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-06-13 07:24:41 +07:00
Robin Appelman 359ccbc023
Adjust integration tests to new guzzle
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-02-09 17:13:30 +07:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Vincent Petry 3740f9bc26
Integration test check download without saving file locally
Use Guzzle stream mode to download the contents instead of using a
temporary local file.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-16 23:57:16 +07:00
Roeland Jago Douma e392f669c0
Make OCS intergration tests check for CSP
* Very hacky in simple test but at least we test
2016-09-15 13:11:36 +07:00
Roeland Jago Douma dd9f195afd
Add OCS-APIREQUEST header to intergration test calls 2016-08-05 14:17:32 +07:00
Vincent Petry 573f6de6a0
Add integration tests for merging received shares 2016-08-03 10:16:28 +07:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +07:00
Joas Schilling cb56dfec6b Split the context so we don't reset the config on each test 2016-03-15 14:53:16 +07:00
Joas Schilling c4b0a1cdfd Add tests for user enumeration and sharing in group only 2016-03-15 14:24:51 +07:00
Thomas Müller 101e446577 Merge pull request #23091 from owncloud/issue-23085-csae-insensitive-group-search
Return the correct group casing in sharee api
2016-03-13 19:51:07 +07:00
Thomas Müller c874ebf425 Merge pull request #23141 from owncloud/behat-code-style
Fix all the yellow, orange and red errors in integration tests
2016-03-11 14:56:44 +07:00