Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: remove the default value when permission check (#3445)

ybzky4bc700b4119d
diff --git a/packages/sheets-ui/src/controllers/permission/sheet-permission-interceptor-base.controller.ts b/packages/sheets-ui/src/controllers/permission/sheet-permission-interceptor-base.controller.ts
index caf860d0e1..15cb4a5ded 100644
--- a/packages/sheets-ui/src/controllers/permission/sheet-permission-interceptor-base.controller.ts
+++ b/packages/sheets-ui/src/controllers/permission/sheet-permission-interceptor-base.controller.ts
@@ -396,7 +396,7 @@ export class SheetPermissionInterceptorBaseController extends Disposable {
}
const row = selection?.primary?.actualRow ?? 0;
const col = selection?.primary?.actualColumn ?? 0;
- const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;
+ const { workbookTypes, worksheetTypes, rangeTypes } = permissionTypes;
if (workbookTypes) {
const workbookDisable = workbookTypes.some((F) => {
const instance = new F(unitId);
@@ -458,7 +458,7 @@ export class SheetPermissionInterceptorBaseController extends Disposable {
return false;
}
- const { workbookTypes = [WorkbookEditablePermission], worksheetTypes, rangeTypes } = permissionTypes;
+ const { workbookTypes, worksheetTypes, rangeTypes } = permissionTypes;
if (workbookTypes) {
const workbookDisable = workbookTypes.some((F) => {
const instance = new F(unitId);