Hide add-OP form for non-superadmin

PlayerManager no longer renders the "Add player" input + button when a
regular admin is viewing the Ops tab — the read-only banner remains so
they understand why.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hurkicorgi 2026-04-13 06:55:41 -06:00
parent 1ac5513d2c
commit 1d7d2a34fb

View file

@ -162,7 +162,8 @@ export function PlayerManager() {
))}
</div>
{/* Add player input */}
{/* Add player input — hidden on Ops tab for non-superadmin */}
{!(tab === "ops" && !isSuperadmin) && (
<div className="flex flex-col sm:flex-row gap-2">
<div className="flex-1">
<Input
@ -209,6 +210,7 @@ export function PlayerManager() {
{tab === "ops" ? "Add OP" : tab === "whitelist" ? "Add" : "Ban"}
</Button>
</div>
)}
<Separator />