From 928466da3641a528092865332587d0fb5517c45f Mon Sep 17 00:00:00 2001 From: JohnSharpe Date: Thu, 26 Oct 2023 15:21:23 +0100 Subject: [PATCH] Added enableDefaultUser --- database_test.go | 6 +++++- service/databases/model.go | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/database_test.go b/database_test.go index 7b48353..8e72e50 100644 --- a/database_test.go +++ b/database_test.go @@ -223,6 +223,7 @@ func TestDatabase_Get(t *testing.T) { "hashingPolicy": "custom" }, "security": { + "enableDefaultUser": false, "password": "test", "sslClientAuthentication": false, "sourceIps": [ @@ -286,6 +287,7 @@ func TestDatabase_Get(t *testing.T) { }, }, Security: &databases.Security{ + EnableDefaultUser: redis.Bool(false), SSLClientAuthentication: redis.Bool(false), SourceIPs: redis.StringSlice("0.0.0.0/0"), Password: redis.String("test"), @@ -337,7 +339,8 @@ func TestDatabase_Update(t *testing.T) { "name": "dataset-size", "value": 80 } - ] + ], + "enableDefaultUser": false }`, `{ "taskId": "task", "commandType": "databaseUpdateRequest", @@ -395,6 +398,7 @@ func TestDatabase_Update(t *testing.T) { Value: redis.Int(80), }, }, + EnableDefaultUser: redis.Bool(false), }) require.NoError(t, err) } diff --git a/service/databases/model.go b/service/databases/model.go index 3c5add4..23f796d 100644 --- a/service/databases/model.go +++ b/service/databases/model.go @@ -120,6 +120,7 @@ func (o RegexRule) String() string { } type Security struct { + EnableDefaultUser *bool `json:"enableDefaultUser,omitempty"` SSLClientAuthentication *bool `json:"sslClientAuthentication,omitempty"` SourceIPs []*string `json:"sourceIps,omitempty"` Password *string `json:"password,omitempty"` @@ -176,6 +177,7 @@ type UpdateDatabase struct { Alerts []*UpdateAlert `json:"alerts,omitempty"` EnableTls *bool `json:"enableTls,omitempty"` RemoteBackup *DatabaseBackupConfig `json:"remoteBackup,omitempty"` + EnableDefaultUser *bool `json:"enableDefaultUser,omitempty"` } func (o UpdateDatabase) String() string {