pub(crate) async fn may_set_displayname<T>(
services: &Services,
body: &Args<T>,
is_admin: impl AsyncFnOnce() -> bool,
) -> boolwhere
T: Sync,Expand description
Whether the caller may change display names under enable_set_displayname.
Appservices and server admins are exempt, matching Synapse’s exemption for
admins. is_admin is awaited only when the option is off and the caller
is not an appservice.