The provider of a federated sharer comes from the remote instance and
we put it into messageRich ourselves, which web renders as HTML. We
now only name it if it is a plain hostname. Otherwise the notification
says "Someone shared ... with you".
Looking up the federated sharer now has a timeout of 5 seconds, logs
why it failed and caches failed lookups as well, so a hanging invite
manager no longer blocks GET /notifications and a deleted federated
connection costs one lookup per request instead of one per
notification.
The acceptance scenario for the disabled "Share Removed" setting now
waits for the notification of a second share sent after the unshare
before it checks that the unshare notification did not show up.
Before, it checked once right after the 204 and passed even if the
setting was ignored.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Users never got a notification when a federated instance shared
something with them or removed that share again. The ocmcore service
publishes OCMCoreShareCreated and OCMCoreShareDelete, but only when it
has an events config, and the ocm service never passed one.
We now pass the events config to ocmcore, and userlog turns both
events into the regular "Resource shared" / "Resource unshared"
notifications for the grantee. They honor the same in-app settings as
local shares.
The sharer is a federated user, so we look it up with GetAcceptedUser in
the name of the grantee. That call has to go out without the service
account token, otherwise the invite manager filters by the service
account and finds nothing. If the lookup fails, e.g. because the
federated connection was deleted, the notification says "Someone at
<provider domain> shared <resource> with you" instead of showing an
empty name. The federated id itself is "<uuid>@<issuer url>", which
tells the reader nothing. Clients only fill in the known rich
parameters, so we fill in the provider in the rich message ourselves.
The resource lives on the remote instance. The notification points to
the received share id for both events and carries the resource name
without an id, so clients render it like a local share but don't build
a link to a resource that does not exist here.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
No acceptance scenario checked the mtime after a WebDAV COPY or MOVE.
mtime is covered on the upload path
(coreApiWebdavUploadTUS/uploadFileMtime.feature) but not on the
server-side copy and move operations, which is why the COPY mtime bug in
#2378 surfaced only through rclone's external integration tests.
Add copyFileMtime.feature and moveFileMtime.feature, built from existing
steps: upload a file with a known mtime, copy or move it (to a sibling
name and into a folder), then assert the destination keeps the mtime,
across the old, new and spaces DAV paths. The fix shipped in
https://github.com/opencloud-eu/reva/pull/535; this adds the missing
regression coverage.
The engines get the parsed query now and treat a compile error as
internal, so a geo predicate on a field that is not a geopoint answered
with an internal error instead of a bad request. The parser cannot tell,
it does not know the index fields; ParseQuery checks the geo keys against
the field type table after parsing.
The field facts lived in two packages: search had the field type table,
query had the key resolution and a second copy of the field types. Key
resolution and the geopoint check move to search, next to FieldType, and
query reads them from there. query stays the lowering pass for the
engines; search can now check a parsed query against the fields without
an import cycle.
The geo predicates kept their own table of geopoint fields and resolved the
key themselves, and each engine had its own copy of the lookup. They now go
the way of every other field: the normalizer resolves the key of a geo node,
FieldIsGeopoint asks the field type table that FieldIsNumeric and
FieldIsDatetime read, and both engines get the sibling name from
GeopointField. A key in another spelling is covered by GEO-11.
Sorts the two latitudes in the KQL layer so MinLat <= MaxLat. Only bleve
strictly requires it (it errors on an inverted box; OpenSearch tolerates it),
but doing it centrally keeps behaviour consistent across backends and the AST
easy to reason about. Longitude order is preserved so an antimeridian-crossing
box (minLon > maxLon) still works, which both backends handle identically.
Replaces the ad-hoc key+"_geopoint" concatenation with a proper lookup
(query.ResolveGeoField) derived from the TypeGeopoint field overrides, so it
works for any geopoint field, not just location. Geo predicates on non-geopoint
fields now error instead of querying a nonexistent field.
Adds geo_distance/geo_bounding_box query builders plus a geo_shape polygon
query (relation intersects, the modern replacement for the deprecated
geo_polygon, still valid against geo_point). Wires the geo AST nodes through
the KQL transpiler onto the <field>_geopoint sibling.
Extends the KQL grammar with geo function values on any field, e.g.
location:geo.distance(lat, lon, 5km). Parses into GeoDistance/GeoBoundingBox/
GeoPolygon AST nodes; radius units (km/m/mi) are normalised to meters.
Midnight for "D" and "W" and the days, weeks and hours of "auto" are in
the local time zone of the server, set with TZ or by the system, and UTC
without either (opencloud-eu/reva#1097 moves the slots of "auto" from UTC
to the local time zone). The description of the strategy, the README of
the service and the help of the cleanup command now say so, how to get
UTC, and that the command must run with the same time zone as the server,
otherwise it decides differently.
https://github.com/opencloud-eu/opencloud/issues/4200
Assisted-by: Claude Code:claude-opus-5-5
With TZ, the revision cleanup counts days in that time zone (#4200). The
container image (alpine) has no time zone files, so TZ only works there
because the binary embeds the time zone data, which today it does only
because a dependency, OPA, imports time/tzdata. Import it explicitly, so
that TZ doesn't stop working unnoticed when that dependency changes.
No change in behavior, nor in the size of the binary.
https://github.com/opencloud-eu/opencloud/issues/4200
Assisted-by: Claude Code:claude-opus-5-5
When the storage provider is down, the gateway answers PurgeRecycle with
a failed status instead of a transport error, so every expired item adds
an error. Keep the first ten and count the rest.
* test: commit the composer.lock files of the PHP test dependencies
The PHP dependencies of the acceptance tests were installed without lock
files: .gitignore excluded them, and the Makefile deleted a lock file
whenever its composer.json changed. So every run resolved the newest
versions allowed by the composer.json files, and the tests depended on
whatever was released upstream that day.
Commit the lock files of the root, vendor-bin/behat and
vendor-bin/opencloud-codestyle, and install exactly what they pin.
Before installing, `composer validate` fails if a composer.json was
changed without updating its lock file.
The vendor-bin namespaces don't inherit config.platform of the root
composer.json, so they now set it themselves, to PHP 8.4.1 like the CI
images (PHPUnit 13.3 needs at least 8.4.1). The lock files no longer
depend on the PHP version of whoever updates them.
Dependabot now updates the lock files weekly.
Fixes#4190
Assisted-by: Claude Code:claude-opus-5-5
* test: don't chmod the composer.lock files after the docker test run
The lock files are committed now and the container no longer creates
them, so there is no need to make them writable for everyone. The
chmod 777 set their executable bit, which git reports as a mode change
of the committed files.
Assisted-by: Claude Code:claude-opus-5-5
A Sorting section runs every case against bleve and OpenSearch and compares the order of the matches: size, modification time, track length, year with a second key, the date a photo was taken, a file without the sort value, names in code point order, and the fields that are not sortable. Its rows keep the order of the answer in the README, and the fixtures list the values that are sorted by.
Name is analyzed (lowercaseKeyword) and therefore a text field, which
OpenSearch refuses to sort on without fielddata; enable it in the index
template. The keyword tokenizer emits one term per document, so the
fielddata cache stays small. The schema version has not shipped yet, so
no reindex is needed.
(cherry picked from commit f1d0e7b773b170b119dbd59fa176d656237bed96)
The fan-out passes order_by through to each engine query; the merge
re-sorts the combined matches with CompareMatches and keeps the score
as tiebreaker (and as the sole criterion when no order_by is given).
(cherry picked from commit 66af40fc34fd9daffc028ab06f83f7ade8a360d1)
Sortable is every field that is indexed as a scalar and carried on the
match entity: name, size, lastModifiedDateTime, mimeType and the scalar
facet fields (photo.*, audio.*, image.*, location.*, ...). Both sets
are derived by reflection, so new facet fields become sortable
automatically. Multivalued fields (tags), bare facets and internal
index fields are rejected with invalidRequest at the graph layer.
CompareMatches provides the merge comparator for the service layer.
(cherry picked from commit bd32795194cf3945e8416ede496a147ce8d6cb5c)
Validated against the sortable-field whitelist (name, size,
lastModifiedDateTime, photo.takenDateTime) and forwarded to the search
service as order_by. Also fixes the stub search service's IndexSpace
signature (streaming response) so the suite builds again.
(cherry picked from commit 9aa6a3492de3468da7a8480a3b9ef5748cee1f5d)
(cherry picked from commit 35a6cad8ea6a7890bdc0bc98c7ac97bdcbf477cc)