You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4ae8df
Browse filesBrowse the repository at this point in the historyBrowse files
Top-level rule guards currently get a mutable copy of the `ctx` user
context. If the guard succeeds, this copy is used to replace the
existing context and the rule body is executed.
However, this design is somewhat problematic: first of all, it's
questionable to do such mutation in the first place, and secondly if we
ever want to embed guards deeper inside of a rule, then for consistency
we would expect these to be mutable as well. This would entail a lot of
unnecessary context cloning and bookkeeping for a "feature" that will
likely never be used.
Thus, I opted to simply make the access to the user context read-only
inside of the guard body (as in: we only pass it an immutable
reference).
0 commit comments