Compare commits

...
3 Commits
Author SHA1 Message Date
Cian-H 5b75ac16b6 Make DOI optional and test zenodo release 2026-08-17 11:32:45 +01:00
Cian-H f4207fff72 chore: version bump 2026-08-14 14:29:52 +01:00
Cian-H 6e6f26e8b8 Fixed error in record management config 2026-08-14 14:29:28 +01:00
3 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -8,4 +8,4 @@
"""Metadata for this python module."""
__version__ = "2026.8.14"
__version__ = "2026.8.14.2"
+6
View File
@@ -380,3 +380,9 @@ OAISERVER_ADMIN_EMAILS = [
It **must** include one or more instances.
"""
# Make DOI optional
from invenio_rdm_records.config import RDM_PERSISTENT_IDENTIFIERS
import copy
RDM_PERSISTENT_IDENTIFIERS = copy.deepcopy(RDM_PERSISTENT_IDENTIFIERS)
RDM_PERSISTENT_IDENTIFIERS["doi"]["required"] = False
+12 -9
View File
@@ -34,7 +34,6 @@ from invenio_rdm_records.services.generators import (
IfAtLeastOneCommunity,
IfDeleted,
IfExternalDOIRecord,
IfFileIsLocal,
IfNewRecord,
IfOneCommunity,
IfRecordDeleted,
@@ -45,6 +44,10 @@ from invenio_rdm_records.services.generators import (
SecretLinks,
SubmissionReviewer,
)
from invenio_records_resources.services.files.generators import IfTransferType
from invenio_records_resources.services.files.transfer import (
LOCAL_TRANSFER_TYPE,
)
from invenio_records_permissions.generators import AnyUser, Disable, IfConfig, SystemProcess
from invenio_records_permissions.policies.records import RecordPermissionPolicy
from invenio_users_resources.services.permissions import UserManager
@@ -123,7 +126,7 @@ class IformRDMRecordPermissionPolicy(RecordPermissionPolicy):
ResourceAccessToken("read"),
]
can_get_content_files = [
IfFileIsLocal(then_=can_read_files, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_read_files, else_=[SystemProcess()]),
]
can_create = can_iform_authenticated
@@ -136,12 +139,12 @@ class IformRDMRecordPermissionPolicy(RecordPermissionPolicy):
can_update_draft = can_review
can_draft_create_files = can_review
can_draft_set_content_files = [
IfFileIsLocal(then_=can_review, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_review, else_=[SystemProcess()]),
]
can_draft_get_content_files = [
IfFileIsLocal(then_=can_draft_read_files, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_draft_read_files, else_=[SystemProcess()]),
]
can_draft_commit_files = [IfFileIsLocal(then_=can_review, else_=[SystemProcess()])]
can_draft_commit_files = [IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_review, else_=[SystemProcess()])]
can_draft_update_files = can_review
can_draft_delete_files = can_review
can_manage_files = [
@@ -221,13 +224,13 @@ class IformRDMRecordPermissionPolicy(RecordPermissionPolicy):
can_draft_media_create_files = can_review
can_draft_media_read_files = can_review
can_draft_media_set_content_files = [
IfFileIsLocal(then_=can_review, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_review, else_=[SystemProcess()]),
]
can_draft_media_get_content_files = [
IfFileIsLocal(then_=can_preview, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_preview, else_=[SystemProcess()]),
]
can_draft_media_commit_files = [
IfFileIsLocal(then_=can_preview, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_preview, else_=[SystemProcess()]),
]
can_draft_media_delete_files = can_review
can_draft_media_update_files = can_review
@@ -240,7 +243,7 @@ class IformRDMRecordPermissionPolicy(RecordPermissionPolicy):
ResourceAccessToken("read"),
]
can_media_get_content_files = [
IfFileIsLocal(then_=can_read, else_=[SystemProcess()]),
IfTransferType(LOCAL_TRANSFER_TYPE, then_=can_read, else_=[SystemProcess()]),
]
can_media_create_files = [Disable()]
can_media_set_content_files = [Disable()]