Commit d19cd87
[Port to dtq-dev] Issue dspace-customers#903: make REST root version prefix configurable (#1405)
* fix(rest): make REST root version prefix configurable (default "DSpace")
RootConverter hardcoded "DSpace " as the version-string prefix that the UI
renders as <meta name="Generator">. The "CLARIN-DSpace " identity introduced
by #985 was dropped in the 7.6.5 merge (#1031); hardcoding it back would
mis-brand the non-customer branches. Instead read the prefix from a new
`dspace.version.prefix` property, defaulting to "DSpace" so nothing changes
unless a deployment opts in (e.g. CLARIN sets "CLARIN-DSpace").
Port of dataquest-dev/dspace-customers#903 (item 6).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(rest): fall back to default when dspace.version.prefix is blank
configurationService.getProperty(key, default) only returns the default
when the key is absent; a present-but-empty value returned "" and produced
a malformed version string (leading space) at the REST root. Guard with
StringUtils.defaultIfBlank so both missing and blank collapse to "DSpace".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* config: ship CLARIN-DSpace as the dtq-dev REST version prefix
dtq-dev is the UFAL/CLARIN customer base (see the ufal entry in the
customer registry), not a vendor-neutral integration branch. #985 set the
CLARIN identity on the REST root and the #1031 7.6.5 upgrade merge dropped
it; leaving dspace.version.prefix commented out would have left that
regression open, since the code default is "DSpace".
Activate the property here instead. The code default stays "DSpace", so the
fork identity now lives in configuration rather than in a literal that an
upgrade merge can silently revert. Non-CLARIN deployments set the property
to "DSpace".
Requested in review by milanmajchrak on #1405.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix: add CLARIN-DSpace as defaults
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent a3627a6 commit d19cd87
3 files changed
Lines changed: 21 additions & 1 deletion
File tree
- dspace-server-webapp/src
- main/java/org/dspace/app/rest/converter
- test/java/org/dspace/app/rest/converter
- dspace/config
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| |||
0 commit comments