From f515e1bd3add967a587bd2bc2afb5214efd6d46e Mon Sep 17 00:00:00 2001 From: Maximilian Moser <maximilian.moser@tuwien.ac.at> Date: Fri, 28 Jun 2024 10:40:40 +0200 Subject: [PATCH] Disable community-submission review requests * because this request workflow can be used to evade our mandatory record review * going through this config item seems to be the minimally invasive option (adding a custom requests service component may work better but also requires more maintenance) --- invenio_config_tuw/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/invenio_config_tuw/config.py b/invenio_config_tuw/config.py index cab7741..958c58c 100644 --- a/invenio_config_tuw/config.py +++ b/invenio_config_tuw/config.py @@ -11,6 +11,7 @@ from datetime import datetime from invenio_i18n import gettext as _ from invenio_oauthclient.views.client import auto_redirect_login +from invenio_rdm_records.config import RDM_RECORDS_REVIEWS from .auth import TUWSSOSettingsHelper from .forms import tuw_registration_form @@ -193,6 +194,16 @@ OAISERVER_METADATA_FORMATS = { RDM_ARCHIVE_DOWNLOAD_ENABLED = False +RDM_RECORDS_REVIEWS = [rt for rt in RDM_RECORDS_REVIEWS if rt != "community-submission"] +"""Remove the ``community-submission`` from the list of supported review types. + +We require mandatory record reviews before publication, but community-submission +requests could be used to evade them and publish records directly (when community +members accept the record in question). +As such, we remove the community-submission as a supported review type. +This config item is checked in the `records_service.review.create()` method. +""" + # Invenio-Requests # ================ -- GitLab