Skip to main content

may_set_displayname

Function may_set_displayname 

Source
pub(crate) async fn may_set_displayname<T>(
    services: &Services,
    body: &Args<T>,
    is_admin: impl AsyncFnOnce() -> bool,
) -> bool
where 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.