Skip to content

Commit 6318b7e

Browse files
authored
[Feature] [1.0] Fix NoAuth deployments (#640)
1 parent 4091ed5 commit 6318b7e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/util/arangod/conn/factory.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ func (f factory) AgencyConnection(hosts ...string) (driver.Connection, error) {
7777
if err != nil {
7878
return nil, err
7979
}
80+
if auth == nil {
81+
return conn, nil
82+
}
8083
return conn.SetAuthentication(auth)
8184
}
8285

@@ -96,7 +99,9 @@ func (f factory) Client(hosts ...string) (driver.Client, error) {
9699
return nil, err
97100
}
98101

99-
config.Authentication = auth
102+
if auth != nil {
103+
config.Authentication = auth
104+
}
100105
}
101106

102107
return driver.NewClient(config)
@@ -131,5 +136,8 @@ func (f factory) Connection(hosts ...string) (driver.Connection, error) {
131136
if err != nil {
132137
return nil, err
133138
}
139+
if auth == nil {
140+
return conn, nil
141+
}
134142
return conn.SetAuthentication(auth)
135143
}

0 commit comments

Comments
 (0)