Function wicrs_server::api::set_member_channel_permission [−][src]
pub async fn set_member_channel_permission(
user_id: &str,
hub_id: ID,
member_id: &str,
channel_id: ID,
permission: ChannelPermission,
value: PermissionSetting
) -> Result
Expand description
Sets a channel specific permission for a hub member.
Arguments
user_id
- ID of the user who is making the change.hub_id
- The hub in which the change is being made.member_id
- The hub member whose permissions are being changed.channel_id
- The channel that the change should apply to.permission
- The permission whose setting is being changed.value
- The new setting for the permission.
Errors
This function may return an error for any of the following reasons.
- The user making the change is not in the hub.
- The user whose permission is being changed is not in the hub.
- The user making the change does not have permission to do so.
- The hub could not be saved for any of the reasons outlined by
Hub::save
. - The hub could not be loaded for any of the reasons outlined by
Hub::load
.