15. Authorization Scopes
Chapter 15 of 22 · 20 min
Local verification checkpoint
Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.
EXERCISE
Design an authorization system with at least four scope levels. Implement a tool that behaves differently based on scopeΓÇöfor instance, returning summaries for limited users but full data for elevated users. Write tests verifying each scope level.