Skip to content

Commit

Permalink
support admin code override
Browse files Browse the repository at this point in the history
  • Loading branch information
da-cf committed Jul 30, 2024
1 parent d257a3f commit 75b5cdc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/2797.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_accounts: Add `disable_for_time` attribute
```
1 change: 1 addition & 0 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type TeamsDeviceSettings struct {
GatewayProxyUDPEnabled bool `json:"gateway_udp_proxy_enabled"`
RootCertificateInstallationEnabled bool `json:"root_certificate_installation_enabled"`
UseZTVirtualIP *bool `json:"use_zt_virtual_ip"`
DisableForTime int32 `json:"disable_for_time"`
}

type TeamsDeviceSettingsResponse struct {
Expand Down
7 changes: 5 additions & 2 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) {
"success": true,
"errors": [],
"messages": [],
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":false}
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":false, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":false, "disable_for_time":3600}
}`)
}

Expand All @@ -309,6 +309,7 @@ func TestTeamsAccountGetDeviceConfiguration(t *testing.T) {
GatewayProxyUDPEnabled: false,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(false),
DisableForTime: 3600,
})
}
}
Expand All @@ -324,7 +325,7 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) {
"success": true,
"errors": [],
"messages": [],
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":true}
"result": {"gateway_proxy_enabled": true,"gateway_udp_proxy_enabled":true, "root_certificate_installation_enabled":true, "use_zt_virtual_ip":true, "disable_for_time":3600}
}`)
}

Expand All @@ -335,6 +336,7 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) {
GatewayProxyEnabled: true,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(true),
DisableForTime: 3600,
})

if assert.NoError(t, err) {
Expand All @@ -343,6 +345,7 @@ func TestTeamsAccountUpdateDeviceConfiguration(t *testing.T) {
GatewayProxyUDPEnabled: true,
RootCertificateInstallationEnabled: true,
UseZTVirtualIP: BoolPtr(true),
DisableForTime: 3600,
})
}
}
Expand Down

0 comments on commit 75b5cdc

Please sign in to comment.