Files
opencloud/services/graph/pkg/service/v0/export_test.go
T
Pascal Bleser f45248336a fix(graph): list the tags in use sorted and cut at a fixed limit
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
2026-11-18 11:01:55 +01:00

9 lines
224 B
Go

package svc
var (
CS3ReceivedShareToLibreGraphPermissions = cs3ReceivedShareToLibreGraphPermissions
)
// MaxListedTagsForTest is the maximum number of tags that GetTags returns.
const MaxListedTagsForTest = maxListedTags