From 6e9a31124a19fb033af88b11ecacbf3deee0b9eb Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Thu, 27 Jun 2024 14:55:12 +0200 Subject: [PATCH] moderation: fix admin record / draft links * Fix admin user lists show no results * Closes https://github.com/inveniosoftware/invenio-app-rdm/issues/2721 * No need to change moderation links as they are functional --- invenio_users_resources/services/users/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/invenio_users_resources/services/users/config.py b/invenio_users_resources/services/users/config.py index 5542d5e..93f3b7c 100644 --- a/invenio_users_resources/services/users/config.py +++ b/invenio_users_resources/services/users/config.py @@ -2,6 +2,7 @@ # # Copyright (C) 2022 TU Wien. # Copyright (C) 2022 CERN. +# Copyright (C) 2024 KTH Royal Institute of Technology. # # Invenio-Users-Resources is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more @@ -194,10 +195,12 @@ class UsersServiceConfig(RecordServiceConfig, ConfiguratorMixin): "avatar": Link("{+api}/users/{id}/avatar.svg"), "records_html": Link("{+ui}/search/records?q=user:{id}"), "admin_records_html": Link( - "{+ui}/administration/records?q=user:{id}&f=allversions", when=can_manage + "{+ui}/administration/records?q=parent.access.owned_by.user:{id}&f=allversions", + when=can_manage, ), "admin_drafts_html": Link( - "{+ui}/administration/drafts?q=user:{id}&f=allversions", when=can_manage + "{+ui}/administration/drafts?q=parent.access.owned_by.user:{id}&f=allversions", + when=can_manage, ), "admin_moderation_html": Link( "{+ui}/administration/moderation?q=topic.user:{id}", when=can_manage