From 83fde46a59c6f1910806a6106b5526b8adbc386c Mon Sep 17 00:00:00 2001 From: sct Date: Mon, 7 Dec 2020 11:45:23 +0000 Subject: [PATCH] fix(frontend): dont show delete button in request list for users without correct permission --- .../RequestList/RequestItem/index.tsx | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx index f04fd2ef7..e00b022f1 100644 --- a/src/components/RequestList/RequestItem/index.tsx +++ b/src/components/RequestList/RequestItem/index.tsx @@ -162,29 +162,30 @@ const RequestItem: React.FC = ({ request, onDelete }) => { - {requestData.status !== MediaRequestStatus.PENDING && ( - - )} + + + + + {intl.formatMessage(globalMessages.delete)} + + + )} {requestData.status === MediaRequestStatus.PENDING && hasPermission(Permission.MANAGE_REQUESTS) && ( <>