swift: Allow configs with user id instead of user name

This commit is contained in:
Nick Craig-Wood 2017-10-31 14:23:10 +00:00
parent d0b9baab13
commit 4a1013f2de

View File

@ -200,8 +200,8 @@ func swiftConnection(name string) (*swift.Connection, error) {
return nil, errors.Wrap(err, "failed to read environment variables") return nil, errors.Wrap(err, "failed to read environment variables")
} }
} }
if c.UserName == "" { if c.UserName == "" && c.UserId == "" {
return nil, errors.New("user not found") return nil, errors.New("user name or user id not found")
} }
if c.ApiKey == "" { if c.ApiKey == "" {
return nil, errors.New("key not found") return nil, errors.New("key not found")