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