# PDFViewer.commentPermissions()

```ts
commentPermissions(id: string): Promise<CommentPermissions | null>
```

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).

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `id` | `string` | The comment's id. |

Returns `Promise<CommentPermissions | null>`: `{ reply, setStatus, edit, delete }`, each a boolean.

Throws:

- `INVALID_STATE` after `destroy()`.

```ts
const may = await viewer.commentPermissions(id);
deleteButton.hidden = may?.delete !== true;
```

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/commentpermissions
