From 4e6e2ba0d1c0cb715db5630dff8bb43eac8d2f42 Mon Sep 17 00:00:00 2001 From: chenpei Date: Fri, 28 Aug 2026 16:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=99=90=E7=BB=84?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=9B=BE=E7=89=87=E4=BF=9D=E5=AD=98=E8=A2=AB?= =?UTF-8?q?=E5=86=99=E6=AD=BB=E4=B8=8E=E8=AF=BB=E5=8F=96=E7=BC=BA=E5=88=97?= =?UTF-8?q?=EF=BC=8C=E5=8B=BE=E9=80=89=E7=8A=B6=E6=80=81=E5=8F=AF=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E4=BF=9D=E5=AD=98=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/organization/permission-groups/route.ts | 5 +++-- app/api/organization/user-permission-inherits/route.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/api/organization/permission-groups/route.ts b/app/api/organization/permission-groups/route.ts index f0ace5f..6a9679d 100644 --- a/app/api/organization/permission-groups/route.ts +++ b/app/api/organization/permission-groups/route.ts @@ -77,7 +77,7 @@ export async function GET() { canDownload: true, canDownloadSource: true, canShare: true, - canEditAssets: false, + canEditAssets: true, }, }, inheritors: { @@ -259,6 +259,7 @@ export async function PUT(request: NextRequest) { canDownload?: boolean canDownloadSource?: boolean canShare?: boolean + canEditAssets?: boolean }> = Array.isArray(body?.permissions) ? body.permissions : [] if (incoming.length === 0) { return NextResponse.json({ error: '素材类型列表不能为空' }, { status: 400 }) @@ -271,7 +272,7 @@ export async function PUT(request: NextRequest) { canDownload: Boolean(item.canDownload), canDownloadSource: Boolean(item.canDownloadSource), canShare: true, - canEditAssets: false, + canEditAssets: item.canEditAssets === true, })), ) return NextResponse.json({ ok: true }) diff --git a/app/api/organization/user-permission-inherits/route.ts b/app/api/organization/user-permission-inherits/route.ts index 3a6655f..28650b8 100644 --- a/app/api/organization/user-permission-inherits/route.ts +++ b/app/api/organization/user-permission-inherits/route.ts @@ -40,7 +40,7 @@ export async function GET() { canDownload: true, canDownloadSource: true, canShare: true, - canEditAssets: false, + canEditAssets: true, }, }, }, @@ -114,6 +114,7 @@ export async function PUT(request: NextRequest) { canDownload?: boolean canDownloadSource?: boolean canShare?: boolean + canEditAssets?: boolean }> = Array.isArray(body?.permissions) ? body.permissions : [] if (!slug) return NextResponse.json({ error: '缺少套餐' }, { status: 400 }) if (incoming.length === 0) { @@ -127,7 +128,7 @@ export async function PUT(request: NextRequest) { canDownload: Boolean(item.canDownload), canDownloadSource: Boolean(item.canDownloadSource), canShare: item.canShare !== false, - canEditAssets: false, + canEditAssets: item.canEditAssets === true, })), ) return NextResponse.json({ ok: true })