fix: can delete scores of others if admin

This commit is contained in:
zkldi
2023-01-21 00:25:08 +00:00
parent 70de360d94
commit f192c04962
@@ -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
</SelectButton>
)}
{currentUser?.id === user.id && (
{(currentUser?.id === user.id ||
currentUser?.authLevel === UserAuthLevels.ADMIN) && (
<SelectButton setValue={setView} value={view} id="manage">
<Icon type="trash" />
Delete Score