Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions invenio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ from invenio_rdm_records.notifications.vcs import (
RepositoryReleaseCommunitySubmittedNotificationBuilder,
RepositoryReleaseFailureNotificationBuilder,
RepositoryReleaseSuccessNotificationBuilder)
from invenio_rdm_records.services.request_policies import (
FileModificationAdminPolicy,
)
from invenio_preservation_sync.utils import preservation_info_render
from invenio_cern_sync.users.profile import CERNUserProfileSchema
from invenio_oauthclient.views.client import auto_redirect_login
Expand Down Expand Up @@ -499,6 +502,23 @@ RDM_COMMUNITY_REQUIRED_TO_PUBLISH = True
RDM_NEW_RECORD_VERSION_REVIEW_POLICY = CDSRecordVersionReviewPolicy
CDS_COMMUNITIES_REQUIRING_NEW_RECORD_VERSION_REVIEW = []

RDM_IMMEDIATE_FILE_MODIFICATION_POLICIES = [
FileModificationAdminPolicy(),
]
"""Allow only instance-wide admins to modify files of records without creating a new version."""

RDM_FILE_MODIFICATION_PERIOD = timedelta(days=30)
"""
Instance-wide admins should only be able to modify files for up to 30 days after the publishing of a record
version.

The file "bucket" can be unlocked (only by the admin) at any point in this period, and then the admin, the owner of the record,
or the curators of the community can modify the files. The record must be definitively published by the end
of 30 days after first publication.

E.g. if the bucket is unlocked 29 days after initial publication, files can only be modified for 1 day.
"""

RDM_SEARCH = {
**deepcopy(RDM_SEARCH),
"query_parser_cls": QueryParser.factory(
Expand Down
Loading