Commit Graph

613 Commits

Author SHA1 Message Date
Enrique Pérez Arnaud fc31f97018 feat(federatedfilesharing): create refresh tokens and sign token exchange
Co-authored-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Micke Nordin <kano@sunet.se>
Signed-off-by: Enrique Pérez Arnaud <enrique@cazalla.net>
2026-06-17 11:01:15 +02:00
Côme Chilliet e1dd3da78a chore: Adapt integration test to API change
Trying to create an auth token from an authtoken
 returns 403 now, not 503 (which is more correct)

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-16 15:21:37 +02:00
Benjamin Gaussorgues 83b863499a chore(deprecated): remove imagedestroy as it's noop since PHP 8.0
Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-06-11 09:45:05 +02:00
Robin Appelman 3ee547354f test: add test for uploading to publicly shared external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-06-08 18:01:48 +02:00
Anna Larch 09ed12161d fix(tests): remove integration tests that depend on deleted Remote API classes
The Remote API classes (OC\Remote\* and OCP\Remote\*) were removed in
#60953, but the remoteapi Behat integration suite was not updated. This
caused fatal PHP errors when Behat tried to bootstrap RemoteContext,
breaking the integration test run on master.

Remove RemoteContext.php, remote.feature, and the remoteapi suite entry
in behat.yml since there is nothing left to test.

Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Anna Larch <anna@nextcloud.com>
2026-06-04 10:57:00 +02:00
Côme Chilliet 1ab09ec753 chore: Apply new coding standard to all files
The diff can be checked using: git diff --ignore-all-space --ignore-blank-lines
To see only the changes not related to blank lines.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-06-01 13:46:39 +02:00
Anna Larch d58e55ad63 test(behat): reset per-scenario state in BasicStructure and Sharing
Add @BeforeScenario hooks to reset auth/server state and sharing state
between scenarios, preventing state bleed across test runs.

- BasicStructure: reset currentUser, currentServer, baseUrl, apiVersion,
  requestToken and cookieJar (baseUrl and currentServer go together via
  usingServer(), so both must be reset)
- Sharing: reset lastShareData, storedShareData and savedShareId

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 16:06:54 +02:00
Robin Appelman c91f8b0e2c test: adjust tests to unsorted folder listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-05-12 19:30:24 +02:00
Ferdinand Thiessen 5b756ad8bc refactor: split appstore from settings
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-05-05 10:41:04 +02:00
nextcloud-command e11e7f1c70 refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
2026-04-29 23:54:19 +02:00
Hamza d9426a2b22 test(integration): write integration tests for calendar delegation
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
2026-04-28 13:09:25 +02:00
Robin Appelman 7b3457003c fix: update shares on group delete
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:17:37 +02:00
Robin Appelman 9c399ba4ac feat: use time-based cutoff for share updating instead of count
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 18:16:42 +02:00
Robin Appelman 9422634185 test: add test for delayed share validate
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-24 14:39:50 +02:00
Hamza c9ec8528be test(integration): add proper cleanup for caldav scenarios
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
2026-04-20 14:17:47 +02:00
Hamza aade4ed244 test(integration): add tests for calendar delegation
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
2026-04-18 16:17:43 +02:00
Joas Schilling e0cc0239a7 Merge pull request #59601 from nextcloud/test/noid/add-integration-test-for-accepting-share
test(integration): Add integration test for accept share
2026-04-14 20:47:12 +02:00
Joas Schilling b8f146a454 test(integration): Add integration test for accept share
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-14 16:16:54 +02:00
Carl Schwan c574c1b51c Merge pull request #59588 from nextcloud/tests/59511/integration-test-guests-app
test(integration): Add an integration test with the guests app
2026-04-14 11:27:05 +02:00
Joas Schilling a8268357f9 test: Add integration test to confirm a user can not add themselves to another group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-13 14:25:54 +02:00
Joas Schilling 14a748bd42 test(integration): Add an integration test with the guests app
It has quite nasty overwrites in place for appconfig and storages
which break too often and can otherwise only be noticed by low privileged
users

Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-11 16:12:43 +02:00
Kate 2351df0172 Merge pull request #58960 from nextcloud/automated/noid/rector-changes 2026-03-17 18:07:29 +01:00
nextcloud-command 5eec4fd69c refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
2026-03-15 14:53:03 +00:00
nfebe 25e7dd799e fix(sharing): Align userid config key in UserPlugin with Manager
UserPlugin reads `shareapi_restrict_user_enumeration_full_match_userid`
(no underscore) while Manager.php and the frontend both use
`shareapi_restrict_user_enumeration_full_match_user_id` (with underscore).

This mismatch causes the "disable exact match by user ID" admin setting
to have no effect on actual sharee search results.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-03-12 13:19:09 +01:00
Côme Chilliet 082664c0c2 chore: Run rector on integration bootstrap code
This avoids integration PHP code to use deprecated method and crash when
 we remove them.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-03-10 14:15:30 +01:00
nfebe ce0d97b6e5 test(share): Update expiration date tests for end-of-day time
Update expected values in ManagerTest to reflect the new behavior
where share expiration dates are set to 23:59:59 instead of 00:00:00.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
2026-02-24 10:43:46 +01:00
Julien Veyssier da455ee86e feat(profile-picker): move the profile picker to the profile app, remove the user_picker app
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2026-02-23 14:40:50 +01:00
Julien Veyssier 20453312bd feat(user-picker): adjust build files
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2026-02-20 10:16:33 +01:00
Côme Chilliet 51ccc8a838 fix: Fix integration tests
Birthdate was missing in editable fields while being editable, and the
 order was checked while having no importance.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-02-05 10:40:23 +01:00
provokateurin ae53c2016b test(ShareesContext): Reset all shareapi related system configs
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-01-21 14:19:36 +01:00
Côme Chilliet f31f4eba7f chore: While at it use strict array search in build/integration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-13 11:48:59 +01:00
Daniel Calviño Sánchez 8e5ae53e02 Merge pull request #56938 from nextcloud/unify-handling-of-exclude-groups-in-contacts-menu-and-sharing
fix: Unify handling of exclude groups in contacts menu and sharing
2026-01-07 18:04:53 +01:00
Carl Schwan bfb7e7dd8e refactor: Add more typing to integration context code
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 10:14:40 +01:00
Carl Schwan df2f3a8422 refactor(integration): Refactor and fix federation integration tests
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 10:14:35 +01:00
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 +01:00
Daniel Calviño Sánchez a1c2a25d9d Merge pull request #56922 from nextcloud/fix-phpunit-11-use-in-behat
test: Fix PHPUnit 11 use in Behat
2025-12-15 19:15:12 +01:00
Kate db530d1eae Merge pull request #56921 from nextcloud/fix-caching-routes-by-users-with-an-active-session 2025-12-15 10:53:04 +01:00
Daniel Calviño Sánchez 19c9d88970 test: Fix PHPUnit 11 use in Behat
Starting with PHPUnit 11.3, some complex outputs of certain asserts
(like "assertStringContainsString") require the output of PHPUnit to be
explicitly setup. Otherwise when the assert fails a type error is
thrown (although it does not seem to affect asserts with simpler
outputs, like "assertEquals").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-12-13 01:22:30 +01:00
Daniel Calviño Sánchez 51ed61bb4a fix: Fix caching routes by users with an active session
When a user has an active session only the apps that are enabled for the
user are initially loaded. In order to cache the routes the routes for
all apps are loaded, but routes defined in routes.php are taken into
account only if the app was already loaded. Therefore, when the routes
were cached in a request by a user with an active session only the
routes for apps enabled for that user were cached, and those routes were
used by any other user, independently of which apps they had access to.
To solve that now all the enabled apps are explicitly loaded before
caching the routes.

Note that this did not affect routes defined using annotations on the
controller files; in that case the loaded routes do not depend on the
previously loaded apps, as it explicitly checks all the enabled apps.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-12-12 16:10:20 +01:00
Daniel Calviño Sánchez de7ddb6e1c test: Fix recording app state when admin is not the current user
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-12-12 16:10:20 +01:00
Julius Knorr a45f4b0cdc fix: Fix setting name inconsistency between backend and frontend
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-12-12 13:08:34 +01: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 +01:00
Daniel Calviño Sánchez fbe2023d39 fix: Unify handling of exclude groups in contacts menu and sharing
If the current user belongs to both one or more groups excluded from
sharing and one or more groups not excluded from sharing the user is
allowed to share. However, in the contacts menu, as soon as the current
user belonged to a group excluded from sharing the user could not search
for local contacts. This has been unified now with the sharing
behaviour, so local contacts can still be searched if the user also
belongs to a group not excluded from sharing (or to no group at all,
which was also allowed before).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-12-09 19:16:59 +01:00
Daniel Calviño Sánchez 70ed393b34 test: Add integration tests for excluded groups in contacts and sharees
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-12-09 19:16:59 +01:00
skjnldsv 32e1d6cf9c chore(files_reminder): add integration tests
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-11-19 11:21:16 +01:00
provokateurin 901859eeb0 fix(FilesDropPlugin): Ensure all request for file request have a nickname
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-11-18 10:34:53 +01:00
Côme Chilliet d1f295dd4a fix(tests): Fix login test for remember me checkbox
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-11-17 14:15:11 +01:00
Daniel Calviño Sánchez dcda12c5db test: Add integration tests to get collaborators without sharebymail app
The "sharebymail" app is enabled by default, so it needs to be enabled
once the scenario ends as other scenarios could expect that the app is
enabled. To solve that now a special step is added that records the
enabled state of the given app and restores it once the scenario ends.

This step only restores the state of already installed apps. If an app
is installed during the test it will not be neither disabled nor
uninstalled after the test ends. Therefore, at least for now, it is
necessary to explicitly call the step to record the app to be restored,
rather than automatically keeping track of the changes in the enabled
state of the apps during the scenario.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-11-11 00:54:38 +01:00
Daniel Calviño Sánchez cee2492196 test: Extract function to get apps with certain enabled state
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-11-11 00:54:37 +01: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 +01:00