# `policy.effect_duplicate`

Policy gives the same list twice.

Area 9, [Policy](../topics/policy.md); not declinable; the next step is usually the agent's.

One list per effect, so "who may read a note?" is one line:

```jadpo
type Handle = Text {
    max_length: 40
}

entity User {
    id: Uuid
    handle: Handle {
        unique: true
    }
}

principal {
    user: {
        subject: User.handle
    }
}

entity Note {
    id: Uuid
    owner_id: User.id {
        on_delete: OnDelete.cascade
    }

    policy: {
        read: [owner_id]
        read: [Access.authenticated]
    }
}
```

```text
error: `read:` is given twice
 --> main.jadpo:26:9
   |
25 |         read: [owner_id]
   |         ---- first given here
26 |         read: [Access.authenticated]
   |         ^^^^ given again
  reason: `Note`'s policy gives each list once, so "who may read?" is always one line.
  next: Merge the two `read:` lists into one (agent)
  rule: policy.effect_duplicate
  help: https://jadpo.dev/docs/errors/policy.effect_duplicate

check failed: 1 error, 1 file
```
