API 참조

FBaseObjectPermission

이 API 페이지의 본문은 현재 영어로 제공됩니다. 코드 시그니처와 식별자는 언어에 따라 바뀌지 않습니다.

Command-backed Edit permission for one stable Base object.

Access

Access through:

Setup

Register @univerjs-pro/bases or a preset that includes it. In plugin mode, import @univerjs-pro/bases/facade. Additional methods below require their listed plugin packages. See Facade setup.

@univerjs-pro/bases

FBaseObjectPermission.canEdit

Returns the effective Edit result after applying the Base unit, parent objects, and this object.

TypeScript
canEdit(): boolean

Returns

Whether the object is currently editable.

Package: @univerjs-pro/bases · Type definitions

FBaseObjectPermission.setEditable

Enables or disables editing for this stable Base object.

This changes only the object's Edit point. canEdit() also applies the Base unit and parent object ceilings, so enabling a child does not override a read-only Base or parent Table.

TypeScript
setEditable(editable?: boolean): Promise<void>

Parameters

  • editable — Optional. Default: true. Whether object editing is allowed. Defaults to true.

Returns

Resolves after the permission command finishes.

Examples

Restore editing for a table

TypeScript
const base = univerAPI.getActiveBase()const table = base?.getTables()[0]if (!table) throw new Error('Tasks table not found.')await table.getPermission().setEditable()

Types: Promise

Package: @univerjs-pro/bases · Type definitions

FBaseObjectPermission.setReadOnly

Makes this stable Base object read-only.

TypeScript
setReadOnly(): Promise<void>

Returns

Resolves after the permission command finishes.

Examples

TypeScript
const table = univerAPI.getActiveBase()?.getTables()[0]if (!table) throw new Error('Table not found.')await table.getPermission().setReadOnly()

Types: Promise

Package: @univerjs-pro/bases · Type definitions

이 가이드는 어떠셨나요?

© 2026 DreamNum Co., Ltd.