# Problem code `'not-permitted'`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts`, `tables/problems.json` and `services/onsite-scripter/scripts/contract-docs-what-to-do.json` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

A member of [`ProblemCode`](../api/ProblemCode.md) · stable · since 2.0.0

A gated capability this account may not use ([`permits()`](../api/Session.permits.md) is false).

## What to do

This account may not use the gated capability, and the account's grants decide it: check [`session.permits(id)`](../api/Session.permits.md) for the member you call ('export' for [`session.export`](../api/Session.export.md), 'labs.geometry.read' for [`labs.geometry.read`](../api/Labs.geometry.read.md)) before showing its control; [`session.export`](../api/Session.export.md) rejects DOMException 'NotAllowedError' without it.

```ts
exportButton.hidden = !session.permits('export');
```

## Where the declaration names it

- [`Session.export`](../api/Session.export.md): Errors: rejects DOMException 'NotAllowedError' when [`permits('export')`](../api/Session.permits.md) is false (problem 'not-permitted').

The set is open: handle a code you don't know (`'other'`).

## Recorded by

- the table row `failure-matrix/errorCases/not-permitted` (`tables/failure-matrix.json`)
