From 7c0277b8bc05cc151da60e6771d31fbffe8f9623 Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Tue, 26 Sep 2023 13:41:37 +0200 Subject: [PATCH] config: enabled users and communities administration. --- invenio.cfg | 9 ++++++++- site/zenodo_rdm/redirector.py | 9 ++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/invenio.cfg b/invenio.cfg index 32d0baa8..56a23775 100644 --- a/invenio.cfg +++ b/invenio.cfg @@ -550,6 +550,13 @@ OPENAIRE_DIRECT_INDEXING_ENABLED = True """Enable sending published records for direct indexing at OpenAIRE.""" RDM_RECORDS_SERVICE_COMPONENTS = DefaultRecordsComponents + [OpenAIREComponent] +"""Addd OpenAIRE component to records service.""" RDM_SEARCH_SORT_BY_VERIFIED = True -"""Enable the sorting of records by verified""" \ No newline at end of file +"""Enable the sorting of records by verified.""" + +USERS_RESOURCES_ADMINISTRATION_ENABLED = True +"""Enable user administration.""" + +COMMUNITIES_ADMINISTRATION_DISABLED = False +"""Enable communities administration.""" \ No newline at end of file diff --git a/site/zenodo_rdm/redirector.py b/site/zenodo_rdm/redirector.py index f024ff19..6b8021be 100644 --- a/site/zenodo_rdm/redirector.py +++ b/site/zenodo_rdm/redirector.py @@ -49,14 +49,11 @@ def communities_detail_view_function(): The following routes are redirected as follows: - /communities/about// -> GET /communities/ - /collection/user- -> GET /communities/ - - /communities//about -> GET /communities/ :return: url for the view 'invenio_app_rdm_communities.communities_detail' :rtype: str """ - _id = request.view_args.get("id") - if not _id: - _id = request.view_args["community_id"] + _id = request.view_args["id"] values = {"pid_value": _id} target = url_for("invenio_app_rdm_communities.communities_detail", **values) return target @@ -71,9 +68,7 @@ def communities_settings_view_function(): :return: url for the view 'invenio_communities.communities_settings' :rtype: str """ - _id = request.view_args.get("id") - if not _id: - _id = request.view_args["community_id"] + _id = request.view_args["community_id"] values = {"pid_value": _id} target = url_for("invenio_communities.communities_settings", **values) return target