PDFViewer.commentPermissions()
What the user may do to a comment by the panel's rules —
{ reply, setStatus, edit, delete }; null when no comment has that id (none, or a link, form field, pop-up or hidden annotation).methodComments and panelssince 1.0.0
Signature
commentPermissions(id: string): Promise<CommentPermissions | null>
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | The comment's id. |
Returns
Promise<CommentPermissions | null> { reply, setStatus, edit, delete }, each a boolean.
Throws
INVALID_STATEafterdestroy().
Example
TypeScript
const may = await viewer.commentPermissions(id); deleteButton.hidden = may?.delete !== true;