pub fn actor(cx: &Cx) -> Option<&(dyn PanelUser + 'static)>Expand description
The person behind the request: the user acting as another through
impersonation, else the signed-in user; None when nobody is signed in
to the request’s panel.
What a request did is theirs, so an audit trail names this user, not user’s.
fn signed_by(cx: &Cx) -> String {
auth::actor(cx).map_or_else(String::new, |actor| actor.display_name().to_owned())
}