Skip to content

Customisation

We have made a variety of customisations to the base InvenioRDM app. These are potential pain points, particularly when upgrading to a new version of InvenioRDM. On upgrade all of the below should be carefully checked to ensure that they are still working as intended.

Deposit Permissions

Deposit permissions logic has been updated to provide more granular control over who can deposit records. The following changes have been made (see PR #262 and PR #251):

  • Only users or roles with the deposit-action permission can access deposit functionality.
  • The "New upload" button and related UI elements are shown or hidden based on the user's permissions.
  • Deposit permission is assigned to users when they login to the system based on their identity data according to the check defined in ext.py.

Deposit Visibility

The deposit metadata schema has been updated to prevent metadata visibility from being set to private. This means that the metadata for all deposits is public. The visibility of files may still be set to private.

Deposit Data Model

The following changes have been made to the schema used to validate and deserialise the deposit metadata:

  • The the role subfield of creators has been removed. this was considered confusing and to provide better alignment with the Datacite metadata schema.
  • The publisher field has been overridden so that a fixed configurable value is always used.
  • The resource_type field has been overridden so that fixed configurable value is always used.
  • The publication_date field has been overridden so that the date of publication is used.
  • The description field has been made mandatory.
  • The references field has been overridden to always be empty.
  • The rights field has been overriden to prevent more that one license from being supplied.

Vocabularies

Helix overrides selected InvenioRDM vocabulary fixtures through app_data/vocabularies.yaml. The referenced files provide controlled terms for subjects, names, licenses, affiliations, and funders; licenses are loaded from app_data/vocabularies/licenses.csv. Fixtures load during invenio-cli services setup. On a live instance, pipenv run invenio rdm-records add-to-fixture <vocabulary_name> adds or updates fixture terms but does not delete existing terms. Do not use invenio-cli services setup --force outside local development because it wipes the database and search indices.

site/ic_data_repo/vocabs.py imports dynamic data into existing vocabularies: eligible Imperial contributors from Microsoft Graph into names, and awards from ICIS CSV data or Symplectic into awards. It serializes input as YAML and invokes invenio vocabularies import using app_data/vocabularies-import.yaml with update: true. Celery tasks in site/ic_data_repo/tasks.py expose refreshes for users, awards, funders, and affiliations; they are task entry points, not periodic schedules by themselves.

See InvenioRDM's vocabulary customization guide for fixture formats and lifecycle details, and the vocabularies REST API for search behavior.

UI Updates

Layout and Styling

Changes have been made to apply Imperial College London branding to the site. Changes have been made to style sheets via overrides in the assets/less/site directory. HTML templates have also been overriden in the templates/semantic-ui directory. The layout and styling customisations shoud be carefully rechecked on upgrade (particularly of invenio-app-rdm) to ensure that they are still working as intended.

Hiding Communities Feature

InvenioRDM provides a feature for creating communities of deposits with an associated review and approval process for publication. In order to facilitate a central review process by the library for all deposits we have made use of the in-built communities feature. Under this model there is a single community to which all deposits are added and the application UI is updated to remove links and references to communities in key places.

This has been implemented through the following changes:

  • Hiding UI links to pages for creating or listing communities PR #97.
  • Updating links to create a new deposit to have the "icl" community pre-selected.
  • Hiding the communities header on the new deposit page.

Deposit Page

Some changes to the deposit page have made use of the support in InvenioRDM for overriding React components. See InvenioRDM Docs: How to override UI React components for more details. Overriden components are stored in assets/js/invenio_app_rdm/overridableRegistry/mapping.js. In summary:

  • The creators field has been customised to remove the role subfield. Implemented by the custom component OptionalRoleCreatibutorsField that allows control over whether the role subfield is displayed as well as the display of clarifying help text. The implementation of OptionalRoleCreatibutorsField unfortunately required extensive copy-pasting of the original CreatibutorsField component so any updates to invenio-rdm-records should be carefully checked and any changes manually ported over.
  • The contributors field has been customised to add additional help text. This is also implemented using the custom OptionalRoleCreatibutorsField component.
  • The following fields have been hidden - resource_type, publisher, publication_date and references. This has been implemented by overriding with the custom HiddenField component. Some values have still had a default value set where we want values to be present in the metadata but not editable by the user.
  • The description field has been customised to use a standard textarea rather than a rich text editor as it was considered that plain text was more appropriate for this field. It has also been made a mandatory field.
  • The license field has been customised to provide a selection of licenses from a fixed list. Implemented by the custom component LimitedLicenseField. Similar to the OptionalRoleCreatibutorsField this required extensive copy-pasting of the original LicensesField component so the same checks and changes should be applied on update of invenio-rdm-records.
  • A checkbox for the data deposit agreement has been added to the modal created by the Submit For Review button. This checkbox is required to be checked before the user can submit their data for review.
  • The control for reserving a DOI has been overridden to prevent users from opting out of getting a DOI.
  • The control for setting metedata visibility has been hidden.
  • The funding field has been overridden to add additional help text.

Other customisations have used the APP_RDM_DEPOSIT_FORM_DEFAULTS setting (set in site/ic_data_repo/config/settings.py). In summary:

  • resource_type has been set to "dataset".
  • publication_data is set to the current date.
  • rights is set to the CC-BY-4.0 license.
  • publisher is set to "Imperial College London".
  • creators is set to the logged in user.

Settings Menu Customisation

The "Applications" settings menu item in the UI has been hidden to prevent confusion and streamline the user experience. This was implemented in PR #270.

Authentication

Authentication via Imperial SSO is handled by the ic_data_repo.auth.oauth module. This implements an info_handler function that extracts user information the SSO response. Relevant settings for are set in ic_data_repo.config.settings.

Symplectic Integration

An integration with Symplectic Elements API has been implemented. This comprises:

  • Creation and synchronisation of a deposit with a record in Symplectic elements.
  • A relationship is created in Symplectic between the deposit Symplectic record and any existing publication Symplectic records with a DOI that has been included as a related identifier in the deposit metadata.
  • A relationship is created in Symplectic between the deposit Symplectic record and any existing Symplectic awards with an internal or funder reference provided as funding item in the deposit metadata.