diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js index 4a742a12c..526cc5420 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js @@ -1,6 +1,7 @@ /* * This file is part of Invenio. * Copyright (C) 2022-2024 CERN. + * Copyright (C) 2024 KTH Royal Institute of Technology. * * Invenio is free software; you can redistribute it and/or modify it * under the terms of the MIT License; see LICENSE file for more details. @@ -22,8 +23,18 @@ class SearchResultItemComponent extends Component { updateQueryState(currentQueryState); }; + buildAdminLinks = (userId) => { + const baseQuery = `parent.access.owned_by.user:${userId}`; + return { + admin_records_html: `/administration/records?q=${baseQuery}&f=allversions`, + admin_drafts_html: `/administration/drafts?q=${baseQuery}&f=allversions`, + admin_moderation_html: `/administration/moderation?q=topic.user:${userId}`, + }; + }; + render() { const { result, idKeyPath, listUIEndpoint } = this.props; + const adminLinks = this.buildAdminLinks(result.id); return (