# `policy.scope_duplicate`

A scope or tenant is given twice.

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

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

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

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

type StaffRole = Enum {
    steward
}

entity StaffMembership {
    id: Uuid
    user_id: User.id {
        on_delete: OnDelete.cascade
    }
    role: StaffRole

    membership: {
        scope: MembershipScope.application
        scope: MembershipScope.application
        member: user_id
        role: role
    }
}
```

```text
error: `scope:` is given twice
 --> main.jadpo:31:9
   |
30 |         scope: MembershipScope.application
   |         ----- first given here
31 |         scope: MembershipScope.application
   |         ^^^^^ given again
  reason: A membership says once where its role is held, who holds it and which field holds it, so there is never a question of which counts.
  next: Remove one `scope:` (agent)
  rule: policy.scope_duplicate
  help: https://jadpo.dev/docs/errors/policy.scope_duplicate

check failed: 1 error, 1 file
```
