> ## Documentation Index
> Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 6.1.0: Survey visibility

> Run permission commands inside the upgraded app and enable restricted surveys.

**Introduced in:** 6.1.0.
**Action required:** only if you opt into restricted survey visibility.

[Back to the 6.1 checklist](https://formbricks.com/docs/self-hosting/upgrade/versions/6.1.md).

## Survey visibility (opt-in)

Surveys can now be restricted to their owner and the organization's owners and managers. New columns on the
`Survey` table record each survey's owner and visibility. The migrations set every existing survey to
workspace-visible and make its creator the owner, so **access is unchanged after the upgrade**.

> [!NOTE]
>
> Once the marker is set, every survey a person creates starts **Restricted** to its author and the
> organization's owners and managers. They can make it visible to the workspace from **Collaborate** or
> when activating it. See [Survey visibility](https://formbricks.com/docs/surveys/general-features/visibility.md).

Stored visibility is always enforced. To enable new visibility mutations and survey graph checks,
complete the rollout below after upgrading.

Once activated, a survey a person creates is restricted until they share it with the workspace.
Regardless of readiness, API keys cannot see restricted surveys or responses; webhooks, integrations,
feedback sources, follow-ups and workflows cannot receive them.

Two new environment variables:

* **SURVEY\_VISIBILITY\_FORCE\_DISABLED**: `1` disables visibility mutations. Stored restrictions remain
  enforced. Takes effect on restart.
* **SURVEY\_WORKSPACE\_LIMIT**: most surveys one workspace may hold, archived ones included (default `10000`).
  This applies whether or not visibility is enforced: creating a survey past it answers
  `422 workspace_survey_limit_reached`. Raise it before upgrading if a workspace is near the default.

## Complete the visibility rollout

### Open a shell in the upgraded app

The commands below ship **inside the Formbricks image**; no host installation of `formbricks-authzed` is needed.
Confirm every app container/pod runs the target release, then open one shell:

> [tab] Docker and one-click
>
> From your existing Compose directory:
>
> ```bash theme={null}
> docker compose exec formbricks sh
> ```

> [tab] Kubernetes
>
> Replace the namespace, deployment and app container names with your deployment's names:
>
> ```bash theme={null}
> kubectl exec -it -n <namespace> deploy/<app-deployment> -c <app-container> -- sh
> ```

Run the following steps **inside that shell**, using the app's existing database and AuthZed settings.
Stop on any nonzero exit; do not mark the scope ready after a failed repair. Type `exit` when finished.

### Repair and verify

**1. Repair outbox delivery**

Once every container or pod runs the new version, check durable delivery and replay any dead-lettered
survey events. The migration adds the survey trigger while the previous version may still be delivering
outbox events, and that version dead-letters the `survey` event type it does not know. A dead-lettered
survey revocation makes every enforced authorization check fail closed until it is replayed:

```bash theme={null}
formbricks-authzed outbox status
formbricks-authzed outbox replay
formbricks-authzed outbox drain
```

`replay` resets every unresolved dead letter, so investigate any that are not survey events first. See
[AuthZed operations](https://formbricks.com/docs/self-hosting/configuration/authzed-operations.md#audit-and-repair-surveys) for how to
list them.

**2. Repair the survey scope**

After the upgrade, repair the survey scope and mark it ready. This runs the repair, then two further dry
runs, and sets the marker only if both come back clean:

```bash theme={null}
formbricks-authzed backfill --scope=survey --apply --mark-ready
```

**3. Confirm readiness**

Confirm `formbricks-authzed upgrade check` reports `scopes.survey` as ready.

To clear survey graph readiness, run `formbricks-authzed backfill --scope=survey --clear-ready`. Stored restrictions remain enforced. See
[AuthZed operations](https://formbricks.com/docs/self-hosting/configuration/authzed-operations.md#audit-and-repair-surveys) for the audit
and repair commands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.