diff --git a/invenio_app_rdm/config.py b/invenio_app_rdm/config.py index eafc02c6a..713954394 100644 --- a/invenio_app_rdm/config.py +++ b/invenio_app_rdm/config.py @@ -684,6 +684,12 @@ def files_rest_permission_factory(obj, action): APP_RDM_DEPOSIT_FORM_TEMPLATE = "invenio_app_rdm/records/deposit.html" """Deposit page's form template.""" +RECORDS_RESTRICTION_GRACE_PERIOD = timedelta(days=30) +"""Grace period for changing record access to restricted.""" + +ALLOW_RECORD_RESTRICTION_AFTER_GRACE_PERIOD = False +"""Whether record access restriction is allowed after the grace period or not.""" + APP_RDM_USER_DASHBOARD_ROUTES = { "uploads": "/me/uploads", "communities": "/me/communities", diff --git a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html index b97314848..67f1ad68d 100644 --- a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +++ b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html @@ -41,6 +41,15 @@ value='{{ files | tojson }}'> {%- endif %} + {%- if config %} + + + + {%- endif %} + {%- if forms_config %} diff --git a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_tombstone.html b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_tombstone.html new file mode 100644 index 000000000..115a43fc5 --- /dev/null +++ b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_tombstone.html @@ -0,0 +1,38 @@ +{# + Copyright (C) 2024 CERN. + + Invenio App RDM is free software; you can redistribute it and/or modify it + under the terms of the MIT License; see LICENSE file for more details. +#} +{% extends config.THEME_ERROR_TEMPLATE %} + +{%- block message %} +
+ {{_('The record was previously accessible to the public but is now restricted to users with access.')}}
+
+ {{_('The Digital Object Identifier (DOI) associated with this record remains active for reference.')}}
+