diff --git a/rust/connlib/shared/src/messages/client.rs b/rust/connlib/shared/src/messages/client.rs index dbb63b85b..5eef44813 100644 --- a/rust/connlib/shared/src/messages/client.rs +++ b/rust/connlib/shared/src/messages/client.rs @@ -78,9 +78,11 @@ impl ResourceDescriptionCidr { pub struct ResourceDescriptionInternet { /// Resource's id. pub id: ResourceId, - // TBD + /// Sites for the internet resource #[serde(rename = "gateway_groups")] pub sites: Vec, + /// Whether or not resource can be disabled from UI + pub can_be_disabled: Option, } impl ResourceDescriptionInternet { @@ -90,7 +92,7 @@ impl ResourceDescriptionInternet { address: "All internet addresses".to_string(), id: self.id, sites: self.sites, - can_be_disabled: false, + can_be_disabled: self.can_be_disabled.unwrap_or_default(), status, } } diff --git a/rust/connlib/tunnel/src/proptest.rs b/rust/connlib/tunnel/src/proptest.rs index 980af98f5..d95d78ba1 100644 --- a/rust/connlib/tunnel/src/proptest.rs +++ b/rust/connlib/tunnel/src/proptest.rs @@ -78,7 +78,13 @@ pub fn cidr_resource( pub fn internet_resource( sites: impl Strategy>, ) -> impl Strategy { - (resource_id(), sites).prop_map(move |(id, sites)| ResourceDescriptionInternet { id, sites }) + (resource_id(), sites, any::()).prop_map(move |(id, sites, can_be_disabled)| { + ResourceDescriptionInternet { + id, + sites, + can_be_disabled: Some(can_be_disabled), + } + }) } pub fn address_description() -> impl Strategy> {