0.0.8.0
This commit is contained in:
@@ -19,8 +19,8 @@ export async function POST(
|
||||
|
||||
const { treeId } = await params
|
||||
|
||||
// 检查权限(需要 OWNER 权限)
|
||||
const { hasPermission } = await checkPermission(session.user.id, treeId, Role.OWNER)
|
||||
// 检查权限(需要 EDITOR 权限)
|
||||
const { hasPermission } = await checkPermission(session.user.id, treeId, Role.EDITOR)
|
||||
if (!hasPermission) {
|
||||
return NextResponse.json({ error: "无权限导入数据" }, { status: 403 })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user