evaluateGates
evaluateGates(
pathname,customer,gates):GateDecision
Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/gates/gates.d.ts:132
THE gate evaluation pipeline. Normalizes pathname once (the canonical
algorithm), then iterates gates in array order (= shop-list order =
creation order), skipping non-”active” gates. FIRST MATCH WINS: the first
active gate with any rule matching the path decides - allow OR deny - and
evaluation stops (so an earlier login-gate on /members shadows a later
groups-gate on /members/premium for any logged-in customer, by design).
Access: login passes any non-null customer; groups passes a customer
whose tags intersect the gate’s (trimmed, case-insensitive - the
isCustomerPricingMember comparison; the app writes lowercase slugs but a
hand-tagged Wholesale still passes). Anonymous never passes. No gates /
no match ⇒ allow.
Parameters
Section titled “Parameters”pathname
Section titled “pathname”string
customer
Section titled “customer”readonly PageGateEntry[]