Function wicrs_server::api::set_member_hub_permission [−][src]
pub async fn set_member_hub_permission(
user: &User,
hub_id: &ID,
member_id: &ID,
permission: HubPermission,
value: PermissionSetting
) -> Result<()>
Sets a hub wide permission for a hub member.
Arguments
user
- 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.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
.