diff --git a/packages/core/client/src/acl/ACLProvider.tsx b/packages/core/client/src/acl/ACLProvider.tsx
index 7c72f1e8a5..755ed2ee12 100644
--- a/packages/core/client/src/acl/ACLProvider.tsx
+++ b/packages/core/client/src/acl/ACLProvider.tsx
@@ -311,6 +311,8 @@ export const ACLActionProvider = (props) => {
let actionPath = schema['x-acl-action'];
// 只兼容这些数据表资源按钮
const resourceActionPath = ['create', 'update', 'destroy', 'importXlsx', 'export'];
+ // 视图表无编辑权限时不支持的操作
+ const writableViewCollectionAction = ['create', 'update', 'destroy', 'importXlsx', 'bulkDestroy', 'bulkUpdate'];
if (!actionPath && resource && schema['x-action'] && resourceActionPath.includes(schema['x-action'])) {
actionPath = `${resource}:${schema['x-action']}`;
@@ -334,15 +336,15 @@ export const ACLActionProvider = (props) => {
if (!params) {
return {props.children};
}
- //视图表无编辑权限时仅支持显示导出按钮
+ //视图表无编辑权限时不支持 writableViewCollectionAction 的按钮
if (
- ['create', 'update', 'destroy', 'importXlsx'].includes(actionPath) ||
- ['create', 'update', 'destroy', 'importXlsx'].includes(actionPath?.split(':')[1])
+ writableViewCollectionAction.includes(actionPath) ||
+ writableViewCollectionAction.includes(actionPath?.split(':')[1])
) {
if ((collection && collection.template !== 'view') || collection?.writableView) {
return {props.children};
}
- return null;
+ return {props.children};
}
return {props.children};
};