Function wicrs_server::api::ban_user [−][src]
pub async fn ban_user(user: &User, hub_id: &ID, user_id: &ID) -> Result<()>
Bans a user from a hub.
Arguments
user
- User who is performing the ban.hub_id
- Hub from which the user is being banned.user_id
- ID of the user who is to be banned.
Errors
This function may fail for any of the following reasons:
- The user performing the ban is not in the hub
- The hub could not be loaded for any of the reasons outlined by
Hub::load
. - The user performing the ban does not have permission to ban other users.
- The ban failed for any of the reasons outlined by
Hub::ban_user
.