Skip to content

Commit

Permalink
config: enabled users and communities administration.
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo committed Sep 26, 2023
1 parent efbb27e commit 7c0277b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 8 additions & 1 deletion invenio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
"""Enable the sorting of records by verified."""

USERS_RESOURCES_ADMINISTRATION_ENABLED = True
"""Enable user administration."""

COMMUNITIES_ADMINISTRATION_DISABLED = False
"""Enable communities administration."""
9 changes: 2 additions & 7 deletions site/zenodo_rdm/redirector.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@ def communities_detail_view_function():
The following routes are redirected as follows:
- /communities/about/<id>/ -> GET /communities/<pid_value>
- /collection/user-<id> -> GET /communities/<pid_value>
- /communities/<community_id>/about -> GET /communities/<pid_value>
: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
Expand All @@ -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
Expand Down

0 comments on commit 7c0277b

Please sign in to comment.