We bump reva to 0093d72f4c9d, the merge of
https://github.com/opencloud-eu/reva/pull/1035 on reva main. This
brings in the OCM unshare and permission change notifications, the ocm
core share events and the fixes to the permissions of OCM shares, on
top of the invite and provider fixes already on reva main.
It also pulls in the revision cleanup from
https://github.com/opencloud-eu/reva/pull/895. Its strategy defaults
to empty, which keeps all revisions, so nothing changes until we wire
up the option.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
The ldap-server step copied our LDIF files to a directory the bitnami
image never reads, so the image created its own default tree. Our
entrypoint override then polled until LDAP answered and imported the
files with ldapadd. That races with the image setup: it answers on a
temporary slapd that gets shut down when setup finishes. In
https://ci.opencloud.rocks/repos/3/pipeline/5531/21 10_base.ldif failed
with "Already exists" and 20_users.ldif was cut off by the slapd
shutdown, so there was no admin user and the multiTenancy server never
became ready.
We now point LDAP_CUSTOM_LDIF_DIR at the LDIF files. The image imports
them during setup, before slapd listens, and skips its default tree.
The override only creates the TLS certificate.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Byte order is the order in which search engines sort keyword values,
e.g. an OpenSearch terms aggregation ordered by key. With the same
order, the search can return just the first tags of every space, and
merging those lists still gives exactly the first tags overall. A
case-insensitive order would need an aggregation on a lowercased copy
of the field, with a mapping change, a reindex and the loss of the
original casing.
Assisted-by: Claude Code:claude-opus-5-5
GetTags collected the tags of all search results into a tags.Tags
object, which is meant for the tags of a single resource: it stops
accepting tags at 100 and puts new tags in front. So when more than 100
distinct tags were in use, the response held an arbitrary 100 of them,
and the order changed with the order of the search results.
Collect the distinct tags, sort them case-insensitively (ties in byte
order), and cut the list at the documented constant maxListedTags (100).
An empty list is still rendered as "value": [].
Fixes#3889
Assisted-by: Claude Code:claude-opus-5-5
The reva bump pulls in three backports that change what the acceptance
tests see:
- moving now also requires the delete permission, so a sharee with the
Uploader role gets a 403 when moving inside a share
- oc:permissions only contains NV when the user can move, so a file
shared as File Editor now reports SW instead of SNVW
- shares listed in the share jail root report the share jail root as
their parent id, so propfindShares.feature:149 passes now
The Uploader rows move from the "can move" outlines to the "cannot
move" outlines. This shifts one scenario in moveSpaces.feature by three
lines, the expected failures lists are updated accordingly.
related: https://github.com/opencloud-eu/reva/pull/1020
related: https://github.com/opencloud-eu/reva/pull/1023
related: https://github.com/opencloud-eu/reva/pull/1024
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Tags could be of any length. Assigning tags through the graph API now
rejects the whole request with 400 if one of the tags is longer than the
maximum, listing the tags that are too long. The length is counted in
characters, after the whitespace around each tag is removed. Tags that
already exist are not affected.
The maximum is 100 characters by default, and can be changed with
OC_MAX_TAG_LENGTH, or turned off with 0. The frontend service announces
it to clients as the graph.tags.max_tag_length capability, so that they
can check tags before sending them. Both services read the same
variable, without a service-specific alias, so that the announced limit
is always the one graph enforces.
Assisted-by: Claude Code:claude-opus-5-5
We now have two global opt-out switches that stop users from creating
new shares while everything that already exists keeps working:
OC_DISABLE_NEW_USER_SHARES rejects new user, group and federated shares
in graph and reva. Adding members to a space is still possible: graph
skips space roots, based on the stat result, like reva does.
OC_DISABLE_NEW_PUBLIC_LINKS rejects new public links and turning an
internal link into a public link in reva.
The frontend, graph, sharing and ocm services read them. Both default
to false.
We bump reva to 37496dc6abd3, which contains
https://github.com/opencloud-eu/reva/pull/1022
Ported from `owncloud/ocis#12542`, with the flags inverted.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Spaces and received shares can be marked as favorites, but the graph
API did not report it, so the web app could not show them.
drive.root and the sharedWithMe driveItems now carry
@libre.graph.me.following. The space root info only holds the requested
quota metadata, so the per-user flag is also read from the favorites
list the storage driver adds to the opaque.
Fixes#2511
Every pending space has a debounce timer and a timeout timer, and both
call the same work function. The function checked for a run in progress
before taking the mutex, so when both timers were due together, both
calls passed the check and the space was indexed twice at the same
time.
Take the mutex first and return when the work item is no longer the
pending one.
This is also what made "fires at the timeout even when continuously
debounced" flaky: its two timers are due about 50ms apart, which is
close enough on a busy CI runner.
With only the provider cache left the "it uses one cache:" sentence
followed by a list with a single entry read odd, so name the provider
cache in the sentence instead.
Also tell admins where the create home cache went. Someone searching
the README for GATEWAY_CREATE_HOME_CACHE_* now finds that the envvars
are gone and that the proxy remembers which users already have a
personal space.
Assisted-by: Claude Code:claude-fable-5-2
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
The gateway kept a cache of the users whose personal space had already
been created, but the proxy still sent a CreateHome request to the
gateway on every authenticated request, so each of them had to reach
the gateway before that cache could help.
Keep the set of users whose personal space exists in the proxy instead
and skip the gateway call for them. The set lives in memory only: after
a restart the first request of each user simply asks the gateway once
more, so persistence is not needed. A created and an already existing
personal space are both remembered, a failed attempt is not and gets
retried by the next request.
With the cache in the proxy the gateway no longer needs its own, so
remove the create home cache settings (GATEWAY_CREATE_HOME_CACHE_*) and
the create_personal_space_cache_config entry of the generated gateway
configuration, and update the gateway README accordingly.
toAnchor removed every character except ASCII letters, digits and spaces,
so headings like "Read-Only" got the anchor "readonly", while GitHub and
Docusaurus create "read-only". Keep hyphens, underscores and non-ASCII
letters, and add a -1, -2, ... suffix to duplicate anchors, the same way
github-slugger does.
The test "should use atomic write via temp file + rename" set
sawTempFile in a watcher goroutine and read it after close(done),
without waiting for the goroutine to stop, so the race detector failed
TestCache.
Make sawTempFile an atomic.Bool and wait for the watcher to return
before reading it.
Fixes#4010
Assisted-by: Claude Code:claude-opus-5-5
When the transfer of a response broke off after its headers, e.g.
because the server aborted it, sendRequestOnce caught the exception and
passed the incomplete response on as if it were complete. Tests then
failed later, and misleadingly, e.g. with a JsonException on the cut-off
body, or passed when they only checked the status code.
Re-throw Guzzle's ResponseTransferException, so that such a test fails
at the request, with the transfer error (e.g. cURL error 18).
Refs #4008
Assisted-by: Claude Code:claude-opus-5-5
For received shares, remoteItem.parentReference.driveId held the id of
the root item of the drive (<storage>$<space>!<root>) instead of the id
of the drive (<storage>$<space>), unlike all other drive items. Clients
had to cut off the root part themselves to request /drives/{drive-id}.
Use the drive id for user and OCM shares, and expect it in the
acceptance tests of the shared with me listing.
Fixes#3997
Assisted-by: Claude Code:claude-opus-5-5
Requests that carry a guest session cookie together with other
credentials (bearer token, basic auth, public link, signed URL) must be
authenticated with those credentials, or rejected with 401 if they
are invalid, and never fall back to the guest.
The entrypoint of the OnlyOffice image regenerates the fonts after the
document server first started, and restarts it about 30 s later. The
wait step only sees the first instance, and the collaboration service
fetches the WOPI discovery once at startup: when that fetch hits the
restart, it gets a 502, registers without mimetypes, and every
OnlyOffice app-open fails until its next registration 30 s later.
The image comes with the fonts already generated, so skip the
regeneration with GENERATE_FONTS=false.
Fixes#3994
Assisted-by: Claude Code:claude-opus-5-5
A space image can be assigned with a PATCH of the drive on the v1beta1
route as well, and the size limit applies there the same way. Say so in
the README, and cover the refusal of a too large image on that route in
the tests.
Assisted-by: Claude Code:claude-opus-5-5
Under /graph/v1beta1, drives could only be listed. Getting, creating,
updating and deleting a single drive was only possible under v1.0,
which returns the permissions of a drive's root with the old role names
instead of the IDs of the unified roles.
Add GET, PATCH and DELETE on /graph/v1beta1/drives/{driveID}, and POST
on /graph/v1beta1/drives. They take the same requests as their v1.0
counterparts. GET, POST and PATCH return the drive in the v1beta1
format, like the v1beta1 list of drives does: with
$expand=root($expand=permissions), the permissions carry the unified
role IDs and grantedToV2. DELETE behaves the same in both versions.
The handlers for getting, creating and updating a drive now take the
API version as a parameter, and the v1.0 and v1beta1 routes call them
with their own version.
The acceptance test helpers for spaces can now use either version of
the Graph API.
Assisted-by: Claude Code:claude-opus-5-5