# composeRules

**Kind:** Function

**Source:** [`atloria-monorepo/apps/api/src/reader-access/visibility.util.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/reader-access/visibility.util.ts#L114)

Compose a document's own rule with its category ancestor chain into ONE
effective rule (all must pass). null when nothing in the chain has a rule.

## Signature

```ts
function composeRules(rules: Array<unknown | null | undefined>): VisibilityRule | null
```

## Parameters

| Name | Type |
|---|---|
| `rules` | `Array<unknown | null | undefined>` |

**Returns:** `VisibilityRule | null`
