Skip to content

Commit

Permalink
Merge pull request #1486 from dfialho/master
Browse files Browse the repository at this point in the history
GATE-5397: Add support for extended email matching setting
  • Loading branch information
jacobbednarz committed Jan 30, 2024
2 parents 1ad9c2e + 942c690 commit c59ee79
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .changelog/1486.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_accounts: add support for extended email matching
```
2 changes: 1 addition & 1 deletion docs/conventions.md
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
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
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

0 comments on commit c59ee79

Please sign in to comment.