feat: 实现完整的板块级RBAC内容审核系统

- 新增站长/超级管理员/管理员/板块管理员四级角色体系
- 实现实时权限快照加载与细粒度权限校验
- 新增内容审核队列与前后端页面
- 重构用户权限管理与站点管理逻辑
- 新增评论/帖子审核状态与通知推送
- 优化前端权限控制与角色徽章展示
- 修正数据库迁移与默认值问题
This commit is contained in:
2026-09-15 04:47:34 +08:00
parent 6da4309453
commit a7b6421840
44 changed files with 3149 additions and 585 deletions

View File

@@ -5,6 +5,7 @@ import { useRouter } from "next/navigation";
import Link from "next/link";
import { ChevronRight, PenSquare } from "lucide-react";
import { apiCreatePost, apiMe, fetchBoards, type Board } from "@/lib/api";
import { toast } from "@/lib/toast";
export default function ComposePage() {
const router = useRouter();
@@ -44,6 +45,10 @@ export default function ComposePage() {
post_type: "normal",
});
if (res.post) {
// 普通用户发帖进入待审核队列:跳转详情页(作者可见)并提示
if (res.post.status === "pending") {
toast("已提交,等待审核通过后公开", "ok");
}
router.push(`/post/${res.post.id}`);
} else {
setError(res.error || "发帖失败");