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

# Roles & Permissions

> Operator, tenant owner, and viewer permissions — where each role is enforced in Streamly.

## Roles

| Role             | Capabilities                                                              |
| ---------------- | ------------------------------------------------------------------------- |
| **Operator**     | Full `/admin/*`, `/api/operator/*`, license activation, platform settings |
| **Tenant owner** | `/dashboard/*` + tenant-scoped `/api/v1/*` actions for their tenant       |
| **Viewer**       | Storefront, membership-gated playback, profiles, watchlist                |
| **Anonymous**    | Marketing/legal; blocked from auth-gated catalog routes                   |

## Enforcement layers

1. **Middleware** — host redirects, auth gates, profile gate, theme preview header
2. **RLS** — Supabase policies from `006_streamly_rls.sql` and follow-ups
3. **API handlers** — tenant context from host + session

## Theme preview privilege

`/?__theme_preview=` only merges for **admin-signed-in** operators. Anonymous users never receive preview merges.

## Related

* [Roles Overview](/introduction/roles-overview)
* [Authentication Flow](/authentication/authentication-flow)
* [Themes](/admin-dashboard/themes)
