[CLD-7046] Ability to disable self hosted server-side requests to CWS (#26070)
* Add 'Disable' config to CloudSettings to prevent the CWS backend from making calls to the Customer Portal * Add custom error when disabled * Make Disable setting cloud_restrictable * Return 422 instead of 400 --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -3031,6 +3031,7 @@ type CloudSettings struct {
|
||||
CWSURL *string `access:"write_restrictable"`
|
||||
CWSAPIURL *string `access:"write_restrictable"`
|
||||
CWSMock *bool `access:"write_restrictable"`
|
||||
Disable *bool `access:"write_restrictable,cloud_restrictable"`
|
||||
}
|
||||
|
||||
func (s *CloudSettings) SetDefaults() {
|
||||
@@ -3054,6 +3055,10 @@ func (s *CloudSettings) SetDefaults() {
|
||||
isMockCws := MockCWS == "true"
|
||||
s.CWSMock = &isMockCws
|
||||
}
|
||||
|
||||
if s.Disable == nil {
|
||||
s.Disable = NewBool(false)
|
||||
}
|
||||
}
|
||||
|
||||
type ProductSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user