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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>