feat(admin): ACL repair, mod users, ticket clarity, ops online hub
Add Repair nav grants on permissions, /mod/users without email/IP, shared ticket queue banners, and shared online roster on CommandoCentrum. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
686279eb25
commit
6eab5e5343
39 files changed
+841
-106
No files matched your search
@@ -14,7 +14,11 @@ import {
|
||||
import Link from "next/link";
|
||||
import { useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import { createRank, deleteRank } from "@/actions/permissions";
|
||||
import {
|
||||
createRank,
|
||||
deleteRank,
|
||||
repairAdminNavAclGrants,
|
||||
} from "@/actions/permissions";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
@@ -123,15 +127,30 @@ export function PermissionsList({
|
||||
</div>
|
||||
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex flex-wrap items-center justify-between gap-3">
|
||||
<p className="text-muted-foreground">
|
||||
{ranks.length} ranks · {totalUsers.toLocaleString()} users
|
||||
total
|
||||
</p>
|
||||
<Button onClick={() => setShowCreate(true)}>
|
||||
<Plus className="h-4 w-4 mr-1.5" />
|
||||
New Rank
|
||||
</Button>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
<Button
|
||||
variant="outline"
|
||||
disabled={isPending}
|
||||
onClick={() =>
|
||||
run(() => repairAdminNavAclGrants(), {
|
||||
successMessage: "Admin nav ACL grants repaired",
|
||||
})
|
||||
}
|
||||
title="Fill missing admin.* grants for ranks that already have dashboard access (same as migration 0018)"
|
||||
>
|
||||
<ShieldCheck className="h-4 w-4 mr-1.5" />
|
||||
Repair nav grants
|
||||
</Button>
|
||||
<Button onClick={() => setShowCreate(true)}>
|
||||
<Plus className="h-4 w-4 mr-1.5" />
|
||||
New Rank
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Rank cards */}
|
||||
|
||||
Reference in new issue
Block a user