> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/membership/policies.md).

# Policies

Policies are reusable sets of permissions; roles carry them to users.

**Where:** Membership → Policies · `/projects/<project>/membership/policies`

A **policy** is a named set of permission statements — what its holders may do, per module and action. Policies are attached to [roles](/codemash/cloud/membership/roles.md); a user can do what the policies of all their roles allow. Change a policy once and every role that carries it changes with it.

The screen has two tabs, kept in the address (`?tab=System%20Policies`):

* **Custom Policies** — your policies: create, edit, delete.
* **System Policies** — the built-in policies, grouped by module (Project, AI, Marketplace, Database, Files, Emails, …) with the levels **full access**, **read only**, **own data** and **execute**. They are read only.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-aaa1679b39bf5380fb54e03002c2294aacfa45f3%2Fpolicies-list-1.png?alt=media" alt="Policies, Custom Policies tab: content-editing and orders-read"><figcaption><p>Custom Policies with real rows.</p></figcaption></figure>

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-6e6f2c020c58f53a041a49254844f76a2fb7bcea%2Fpolicies-list-2.png?alt=media" alt="Policies, System Policies tab: groups Project (Administrator, Developer, Settings Manager), AI (full access, read only, own data, execute), Marketplace"><figcaption><p>System Policies, grouped by module.</p></figcaption></figure>

## Columns, search and filters

| Column | What it shows                                          |
| ------ | ------------------------------------------------------ |
| Policy | The policy name. Click it to open the policy document. |

No search and no filters; the tab decides custom or system. **Add New** is off without the `membership:create` permission on policies.

## What you can do here

* [Create a policy](/codemash/cloud/membership/policies/new.md)
* [Edit a policy](/codemash/cloud/membership/policies/edit.md) — and look at a system policy
* [Delete a policy](/codemash/cloud/membership/policies/delete.md)
* Attach a policy to a role — [Create a role](/codemash/cloud/membership/roles/new.md)

## Do it from code

```ts
const { policies } = await norbix.hub.membership.getPolicies();
console.log(policies.filter((p) => !p.isSystem).map((p) => `${p.id} ${p.name}`));
// [ 'pol_VCD9yR4worpGo7c5vUyna content-editing', 'pol_1oRlzIGnF3lzemVoX1nwyy orders-read' ]
```

```sh
norbix hub membership policies get
```

The client setup is on the [Membership page](/codemash/cloud/membership.md#use-it-from-code). API: [Get Policies](/codemash/api-reference/membership/policies/get-policies.md) · Concept: [Permissions](/codemash/cloud/concepts/permissions.md)
