GuardedBy
What a guard's required, only and except answer: the declaration a model writes, still holding the guard that made it.
A io.eezo.http.Guarded and nothing more as far as every existing call site can tell, which is why given Guarded[Post] = User.guard.required still says exactly what it said. The one thing it adds is owning, and it can add it only because it still knows who the guard says is behind a request, its currentUser: a plain Guarded has a Route => Route and no way back to the user, so ownership could not be chained onto one.
Value parameters
- currentUser
-
who is signed in, as the key that a row's owner field holds, and nobody when the request carries no live sign in. Read out of the session rather than through the guard's
find, because a covered route is a guarded route and the wrapper already looked the user up before the handler ran; a second lookup per request would buy nothing. - identify
-
the guard's own naming, handed on to
Guardedand read by nothing here; see io.eezo.http.Guarded.identify.
Attributes
- Source
- Owning.scala
- Graph
-
- Supertypes