Shares using the OCM multi-protocol envelope (name multi, with the secret carried in a sibling protocol entry such as webdav) were rejected with Missing sharedSecret in protocol. Scan every protocol entry for the shared secret during validation, resolve the secret from the matching entry, and let the files provider serve the webdav entry of a multi envelope. Covers the file and folder resource types.
Signed-off-by: Micke Nordin <kano@sunet.se>
Accept both the legacy options.sharedSecret envelope and the new
protocol[name].sharedSecret form. Preserve the original cloud ID so the
factory can discover capabilities, then reset shareWith to the local
username for user lookup.
Delegate per-protocol validation to providers via the new
IValidationAwareCloudFederationProvider interface, with split exception
handling: BadRequestException -> 400, ProviderCouldNotAddShareException
-> the exception's own HTTP status (501 fallback).
In the notification handler, fall back to looking up the refresh token
via OcmTokenMapMapper when the access token cannot identify the federation.
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>
`<nextcloud min-version max-version>` is now a required element of the
appinfo for quite a long time. So we can remove the legacy warning from
owncloud times. Its validated with the XSD anyways.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- related to https://github.com/nextcloud/server/issues/57008
Modernize the personal files settings for ownership transfer.
- Use the new `NcForm*` components.
- Use `NcSettingsSection` as root component
- Migrate to Typescript
- Migrate to script-setup
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Add config option shareapi_bundle_reshare_with_edit to include reshare
permission in "Allow editing" bundle. Default is true to maintain
backward compatibility.
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: Carl Schwan <carlschwan@kde.org>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This feature was not used in 8 years and from frontend did not even
properly work anymore and was implemented using deprecated API.
So get rid of it.
The last version that was using a changelog from the changelog server
was Nextcloud 20.
We use the firstrunwizard nowadays for informing about Nextcloud
changes in new releases.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
We always been returning an int for for accepted, but since it was
returned as a mixed from the DB, psalm never complained about the fact
this was typed as a bool in the API doc.
Signed-off-by: Carl Schwan <carl.schwan@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>
Also removed save action from WizardController as there is already a
route in ConfigApiController to save a configuration.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Louis Chmn <louis@chmn.me>
- Rename method parameter from `userId` to `userID`.
- Update log message and `setRecipientUserId` call to use new variable.
- Without this change, we can not accept invites.
Signed-off-by: Micke Nordin <kano@sunet.se>