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 })