Permissions

Slides permissions are applied through commands and can be set for the whole presentation, for a single slide, or for a single element. An edit permission on a child never overrides a read-only parent.

Presentation permissions

TypeScript
import { UnitAction } from '@univerjs/protocol'const presentation = univerAPI.getActivePresentation()if (!presentation) {  throw new Error('No active presentation')}const permission = presentation.getPermission()await permission.setPoint(UnitAction.Export, false)await permission.setPoint(UnitAction.Print, true)console.log(permission.getPoint(UnitAction.Print))

At the presentation level, Edit, Copy, Print, Export, and Comment can be controlled. setReadOnly() disables editing for the whole presentation, and setEditable() enables it again.

Slide and element permissions

TypeScript
const slide = presentation.getSlideByIndex(0)const element = slide?.getElements()[0]if (slide && element) {  await slide.getPermission().setEditable(false)  await slide.getElementPermission(element.getId()).setEditable(true)  console.log(slide.getElementPermission(element.getId()).canEdit())}

The final canEdit() result applies the permission ceiling of all three levels: the presentation, the slide, and the element. If permissions must persist with the snapshot, keep slide and element IDs stable.

How is this guide?

© 2026 DreamNum Co., Ltd.