From dfab92b175b050888fda62415807cbcd7007fdf7 Mon Sep 17 00:00:00 2001 From: Semmy Date: Mon, 31 Oct 2022 23:34:14 +0800 Subject: [PATCH] fix: change import acl --- packages/plugins/import/src/server/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugins/import/src/server/index.ts b/packages/plugins/import/src/server/index.ts index fe85300b9..2f49415de 100644 --- a/packages/plugins/import/src/server/index.ts +++ b/packages/plugins/import/src/server/index.ts @@ -5,7 +5,6 @@ import { enUS, zhCN } from './locale'; import { importMiddleware } from './middleware'; export class ImportPlugin extends Plugin { - beforeLoad() { this.app.i18n.addResources('zh-CN', namespace, zhCN); this.app.i18n.addResources('en-US', namespace, enUS); @@ -25,6 +24,8 @@ export class ImportPlugin extends Plugin { this.app.acl.setAvailableAction('importXlsx', { displayName: '{{t("Import")}}', allowConfigureFields: true, + type: 'new-data', + onNewRecord: true, }); this.app.acl.use(async (ctx, next) => { const { actionName } = ctx.action;