pub async fn fetch_user_roles(
conn: &mut PgConnection,
user_id: Option<Uuid>,
) -> AuthorizationResult<Vec<Role>>Expand description
The roles a user holds, for callers that check several permissions and want to pay for the roles query once by passing the result to authorize_with_fetched_list_of_roles.
An anonymous request has no roles rather than an error, and costs no query.