CodeZettaInterview Hub

NestJS · Guards · Senior · Architecture

Lead: authorization model beyond role strings in Nest?

Short Interview Answer

Move to policy/ability engines (CASL), resource-based checks in domain services, and thin guards that invoke policies.

Detailed Explanation

Roles don't scale for multi-tenant resource ownership. Keep decision logic testable outside HTTP.

Did you know this answer?