From f192c04962b92e15ee958cb30fe2dfbcdb5afa34 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Sat, 21 Jan 2023 00:25:08 +0000 Subject: [PATCH] fix: can delete scores of others if admin --- client/src/components/tables/dropdowns/ScoreDropdown.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/tables/dropdowns/ScoreDropdown.tsx b/client/src/components/tables/dropdowns/ScoreDropdown.tsx index a5a527fb4..2e41db750 100644 --- a/client/src/components/tables/dropdowns/ScoreDropdown.tsx +++ b/client/src/components/tables/dropdowns/ScoreDropdown.tsx @@ -13,6 +13,7 @@ import { PBScoreDocument, ScoreDocument, SongDocument, + UserAuthLevels, UserDocument, } from "tachi-common"; import { GoalsOnChartReturn, UGPTChartPBComposition } from "types/api-returns"; @@ -173,7 +174,8 @@ export default function ScoreDropdown({ Rivals )} - {currentUser?.id === user.id && ( + {(currentUser?.id === user.id || + currentUser?.authLevel === UserAuthLevels.ADMIN) && ( Delete Score