Interface LaravelUi5\Sdk\Partners\Contracts\ScopeResolverInterface

Resolves the set of partner_ids the given actor should be scoped to, as of the given moment in time. The load-bearing primitive behind #[ScopedToActor], #[ScopedToOrgActors], and any future scoping attribute that names a resolver.

Three contract properties protect downstream invariants:

  • Returns int[]. All scoping shapes — self, org-bridge, hierarchy, territory, delegated, composite — produce a set of partner_ids. The applier never special-cases shape; it always emits whereIn(keyColumn, ids).
    • Time-aware via Carbon $at. Replay and audit work without retrofit ("which orgs would the actor have been an active employee of on date X?"). Normal request paths pass Carbon::now().
    • Empty array → fail-closed. No active employment, no resolved tenant, no territory assignment → no rows. The applier emits 1 = 0 rather than whereIn (...) with an empty list. Symmetric to {@see \LaravelUi5\Sdk\Odata\RoleScopeApplier}'s "no actor in context → 1 = 0" behaviour.

See https://laravelui5.com/sdk/security/scoped-entity-sets for the design rationale and the family of resolvers this contract is the foundation of.

Methods