Skip to content

Commit

Permalink
Merge branch 'master' into creatibutor-modal-overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloeppe authored Nov 18, 2024
2 parents c03581c + 352a25c commit 299a39f
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 487 deletions.
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
Changes
=======

Version v16.1.0 (released 2024-11-18)

- tokens: disable "sub" verification
* According to the JWT Specification (https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2)
`sub` has to be a string. PyJWT v2.10.0 started enforcing this validation,
which breaks our usage of storing an object in the `sub` field.
* Fixes jwt.decode options for specifying required fields.
- jsonschemas: backport "internal_notes" to v6.0.0
* Backports the "internal_notes" field to the v6.0.0 JSONSchema, since
it is backwards compatible, and thus doesn't require any record
migration overhead.
- UI: display all affiliations

Version v16.0.1 (released 2024-11-11)

- deposit-ui: fix creator affiliations selection display
Expand Down
2 changes: 1 addition & 1 deletion invenio_rdm_records/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

from .ext import InvenioRDMRecords

__version__ = "16.0.1"
__version__ = "16.1.0"

__all__ = ("__version__", "InvenioRDMRecords")
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of Invenio-RDM-Records
// Copyright (C) 2020-2023 CERN.
// Copyright (C) 2020-2024 CERN.
// Copyright (C) 2020-2022 Northwestern University.
// Copyright (C) 2021 Graz University of Technology.
//
Expand All @@ -11,6 +11,7 @@ import PropTypes from "prop-types";
import { getIn, FieldArray } from "formik";
import { Button, Form, Label, List, Icon } from "semantic-ui-react";
import _get from "lodash/get";
import _map from "lodash/map";
import { FieldLabel } from "react-invenio-forms";
import { HTML5Backend } from "react-dnd-html5-backend";
import { DndProvider } from "react-dnd";
Expand All @@ -27,10 +28,10 @@ const creatibutorNameDisplay = (value) => {

const familyName = _get(value, "person_or_org.family_name", "");
const givenName = _get(value, "person_or_org.given_name", "");
const affiliationName = _get(value, `affiliations[0].name`, "");
const affiliations = _map(value?.affiliations, "name");
const name = _get(value, `person_or_org.name`);

const affiliation = affiliationName ? ` (${affiliationName})` : "";
const affiliation = affiliations.length ? ` (${affiliations.join(", ")})` : "";

if (isPerson) {
const givenNameSuffix = givenName ? `, ${givenName}` : "";
Expand Down
4 changes: 1 addition & 3 deletions invenio_rdm_records/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ class CommonFieldsMixin:
versions_model_cls = models.RDMVersionsState
parent_record_cls = RDMParent

# Remember to update INDEXER_DEFAULT_INDEX in Invenio-App-RDM if you
# update the JSONSchema and mappings to a new version.
schema = ConstantField("$schema", "local://records/record-v7.0.0.json")
schema = ConstantField("$schema", "local://records/record-v6.0.0.json")

dumper = SearchDumper(
extensions=[
Expand Down
18 changes: 18 additions & 0 deletions invenio_rdm_records/records/jsonschemas/records/record-v6.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,24 @@
}
}
},
"internal_notes": {
"properties": {
"id": {
"type": "string"
},
"note": {
"type": "string"
},
"timestamp": {
"type": "string",
"description": "ISO8601 formatted timestamp in UTC.",
"format": "date-time"
},
"added_by": {
"$ref": "local://records/definitions-v2.0.0.json#/agent"
}
}
},
"provenance": {
"type": "object",
"description": "Record provenance.",
Expand Down
Loading

0 comments on commit 299a39f

Please sign in to comment.