Function wicrs_server::api::kick_user[][src]

pub async fn kick_user(actor_id: &str, hub_id: ID, user_id: &str) -> Result<()>
Expand description

Kicks a user from a hub.

Arguments

  • actor_id - ID of the user who is doing the kicking.
  • hub_id - Hub from which the user is being kicked.
  • user_id - ID of the user who is to be kicked.

Errors

This function may fail for any of the following reasons:

  • The user doing the kicking is not in the hub
  • The hub could not be loaded for any of the reasons outlined by Hub::load.
  • The user to be kicked is not in the hub.
  • The user doing the kicking does not have permission to kick other users.
  • The kick failed for any of the reasons outlined by Hub::kick_user.