Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GATE-5397: Add support for extended email matching setting #1486

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1486.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_accounts: add support for extended email matching
```
2 changes: 1 addition & 1 deletion docs/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ making changes the Go SDK.

## Methods

- All methods should take a maxium of 3 parameter. See examples in [experimental](./experimental.md)
- All methods should take a maximum of 3 parameter. See examples in [experimental](./experimental.md)
- The first parameter is always `context.Context`.
- The second is a `*ResourceContainer`.
- The final is a struct of available parameters for the method.
Expand Down
21 changes: 13 additions & 8 deletions teams_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ type TeamsConfiguration struct {
}

type TeamsAccountSettings struct {
Antivirus *TeamsAntivirus `json:"antivirus,omitempty"`
TLSDecrypt *TeamsTLSDecrypt `json:"tls_decrypt,omitempty"`
ActivityLog *TeamsActivityLog `json:"activity_log,omitempty"`
BlockPage *TeamsBlockPage `json:"block_page,omitempty"`
BrowserIsolation *BrowserIsolation `json:"browser_isolation,omitempty"`
FIPS *TeamsFIPS `json:"fips,omitempty"`
ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"`
BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"`
Antivirus *TeamsAntivirus `json:"antivirus,omitempty"`
TLSDecrypt *TeamsTLSDecrypt `json:"tls_decrypt,omitempty"`
ActivityLog *TeamsActivityLog `json:"activity_log,omitempty"`
BlockPage *TeamsBlockPage `json:"block_page,omitempty"`
BrowserIsolation *BrowserIsolation `json:"browser_isolation,omitempty"`
FIPS *TeamsFIPS `json:"fips,omitempty"`
ProtocolDetection *TeamsProtocolDetection `json:"protocol_detection,omitempty"`
BodyScanning *TeamsBodyScanning `json:"body_scanning,omitempty"`
ExtendedEmailMatching *TeamsExtendedEmailMatching `json:"extended_email_matching,omitempty"`
}

type BrowserIsolation struct {
Expand Down Expand Up @@ -97,6 +98,10 @@ type TeamsBodyScanning struct {
InspectionMode TeamsInspectionMode `json:"inspection_mode,omitempty"`
}

type TeamsExtendedEmailMatching struct {
Enabled *bool `json:"enabled,omitempty"`
}

type TeamsRuleType = string

const (
Expand Down
12 changes: 12 additions & 0 deletions teams_accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ func TestTeamsAccountConfiguration(t *testing.T) {
},
"body_scanning": {
"inspection_mode": "deep"
},
"extended_email_matching": {
"enabled": true
}
}
}
Expand Down Expand Up @@ -120,6 +123,9 @@ func TestTeamsAccountConfiguration(t *testing.T) {
UrlBrowserIsolationEnabled: BoolPtr(true),
NonIdentityEnabled: BoolPtr(true),
},
ExtendedEmailMatching: &TeamsExtendedEmailMatching{
Enabled: BoolPtr(true),
},
})
}
}
Expand Down Expand Up @@ -148,6 +154,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) {
},
"protocol_detection": {
"enabled": true
},
"extended_email_matching": {
"enabled": true
}
}
}
Expand All @@ -160,6 +169,9 @@ func TestTeamsAccountUpdateConfiguration(t *testing.T) {
ActivityLog: &TeamsActivityLog{Enabled: true},
TLSDecrypt: &TeamsTLSDecrypt{Enabled: true},
ProtocolDetection: &TeamsProtocolDetection{Enabled: true},
ExtendedEmailMatching: &TeamsExtendedEmailMatching{
Enabled: BoolPtr(true),
},
}

mux.HandleFunc("/accounts/"+testAccountID+"/gateway/configuration", handler)
Expand Down