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:
parent
1ac5513d2c
commit
1d7d2a34fb
1 changed files with 3 additions and 1 deletions
|
|
@ -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 />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue