Skip to content

Commit 063cbb9

Browse files
committed
Integrate curation UI via invenio-override bundle
1 parent 78284e2 commit 063cbb9

6 files changed

Lines changed: 54 additions & 22 deletions

File tree

Dockerfile.mug

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,30 @@ COPY ./themes/MUG/templates/ ${INVENIO_INSTANCE_PATH}/templates/
1919
COPY themes/MUG/variables.less /opt/env/lib/python3.12/site-packages/invenio_override/assets/semantic-ui/less/invenio_override/variables.less
2020
COPY themes/MUG/overrides.less /opt/env/lib/python3.12/site-packages/invenio_override/assets/semantic-ui/less/invenio_override/overrides.less
2121

22+
# Copy MUG config BEFORE webpack so it picks up curation settings
23+
COPY ./themes/MUG/invenio.cfg ${INVENIO_INSTANCE_PATH}/invenio.cfg
24+
2225
RUN invenio collect --verbose && invenio webpack create
2326

2427
WORKDIR ${INVENIO_INSTANCE_PATH}/assets
2528
RUN pnpm install
2629
RUN pnpm run build
2730

31+
2832
# STAGE 2
2933
FROM ghcr.io/tu-graz-library/docker-invenio-base:main-frontend AS frontend
3034

3135
COPY --from=builder ${VIRTUAL_ENV}/lib ${VIRTUAL_ENV}/lib
3236
COPY --from=builder ${VIRTUAL_ENV}/bin ${VIRTUAL_ENV}/bin
3337
COPY --from=builder ${INVENIO_INSTANCE_PATH}/app_data ${INVENIO_INSTANCE_PATH}/app_data
38+
COPY --from=builder ${INVENIO_INSTANCE_PATH}/assets ${INVENIO_INSTANCE_PATH}/assets
3439
COPY --from=builder ${INVENIO_INSTANCE_PATH}/static ${INVENIO_INSTANCE_PATH}/static
3540
COPY --from=builder ${INVENIO_INSTANCE_PATH}/translations ${INVENIO_INSTANCE_PATH}/translations
3641
COPY --from=builder ${INVENIO_INSTANCE_PATH}/templates ${INVENIO_INSTANCE_PATH}/templates
3742

3843
WORKDIR ${WORKING_DIR}/src
3944
COPY ./docker/uwsgi/ ${INVENIO_INSTANCE_PATH}
40-
# invenio.cfg already copied in builder stage, ensure it's in final location
45+
# Use MUG config (copied after webpack build so it's available for runtime)
4146
COPY ./themes/MUG/invenio.cfg ${INVENIO_INSTANCE_PATH}
4247
RUN chown invenio:invenio .
4348

assets/js/invenio_app_rdm/overridableRegistry/mapping.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
// under the terms of the MIT License; see LICENSE file for more details.
66

77
/**
8-
* Add here all the overridden components of your app.
8+
* Curation component overrides for InvenioRDM.
9+
* These are imported and bundled from invenio-override package.
910
*/
1011

12+
// Import curation components from invenio-override's bundle
13+
// (which includes the full implementation with invenio-curations)
1114
import { DepositBox } from "@js/invenio_curations/deposit/DepositBox";
1215
import { curationComponentOverrides } from "@js/invenio_curations/requests";
1316

1417
export const overriddenComponents = {
1518
...curationComponentOverrides,
1619
"InvenioAppRdm.Deposit.CardDepositStatusBox.container": DepositBox,
17-
};
20+
};

create-test-users.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
# Create users for local testing: regular, admin, and curator
3+
4+
set -e
5+
6+
echo "Creating roles (if they don't exist)..."
7+
8+
# Create admin role if it doesn't exist
9+
invenio roles create admin 2>/dev/null || echo "Role 'admin' already exists"
10+
11+
# Create curation moderation role if it doesn't exist
12+
invenio roles create administration-rdm-records-curation 2>/dev/null || echo "Role 'administration-rdm-records-curation' already exists"
13+
14+
# Grant permissions to admin role
15+
echo "Granting permissions to admin role..."
16+
invenio access allow superuser-access role admin 2>/dev/null || echo "Permission already granted"
17+
18+
echo ""
19+
echo "Creating users..."
20+
21+
# Create regular user
22+
echo "Creating regular user: user@test.org (password: 123456)"
23+
invenio users create user@test.org --password 123456 --active --confirm 2>/dev/null || echo "User 'user@test.org' already exists"
24+
25+
# Create admin user
26+
echo "Creating admin user: admin@test.org (password: 123456)"
27+
invenio users create admin@test.org --password 123456 --active --confirm 2>/dev/null || echo "User 'admin@test.org' already exists"
28+
invenio roles add admin@test.org admin 2>/dev/null || echo "Role already assigned"
29+
30+
# Create curator user
31+
echo "Creating curator user: curator@test.org (password: 123456)"
32+
invenio users create curator@test.org --password 123456 --active --confirm 2>/dev/null || echo "User 'curator@test.org' already exists"
33+
invenio roles add curator@test.org administration-rdm-records-curation 2>/dev/null || echo "Role already assigned"
34+
35+
echo ""
36+
echo "Users created successfully!"
37+
echo ""
38+
echo "Login credentials:"
39+
echo " Regular user: user@test.org / 123456"
40+
echo " Admin user: admin@test.org / 123456"
41+
echo " Curator user: curator@test.org / 123456"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ py-modules = []
2424

2525
[tool.uv.sources]
2626
invenio-curations = { git = "https://github.com/tu-graz-library/invenio-curations", branch = "main" }
27-
invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "fix-curation-permissions"}
27+
invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "fix-curation-permissions" }

site/instance/webpack.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

themes/MUG/variables.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
/* Accessibility-related badge colors */
1414
@accessRight : @overridePrimary;
15-
@accessRightOpen : #db2828;
15+
@accessRightOpen : @accessRight;
1616
@accessRightRestricted : #db2828;
1717
@accessRightEmbargoed : #fbbd08;
1818
@accessRightClosed : @accessRightEmbargoed;

0 commit comments

Comments
 (0)