# SecurityApi.unlockOwnerPermissions()

```ts
unlockOwnerPermissions(ownerPassword: string): Promise<boolean>
```

Unlocks a document opened with the user password. Once accepted, everything is allowed: the viewer follows the unlock at once, and the unlock outlives every later reload (an edit, an undo). Needs no feature.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `ownerPassword` | `string` | The document's owner password. |

Returns `Promise<boolean>`: Whether the password was accepted.

Throws:

- `DOCUMENT_CLOSED` — the document has been closed.

```ts
const unlocked = await doc.security.unlockOwnerPermissions(ownerPassword);
if (!unlocked) showError('Wrong owner password');
```

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

Web page: https://kernstra.com/docs/web-sdk/api/doc-security/unlockownerpermissions
