mirror of
https://github.com/rqlite/rqlite.git
synced 2022-10-30 02:37:32 +03:00
Clean up unncessary conditional. Add explicit auth/ tests for empty credentials/anonymous case
This commit is contained in:
@@ -182,12 +182,9 @@ func (s *Service) checkCommandPerm(c *Command, perm string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
var username string
|
||||
var password string
|
||||
if c.Credentials == nil {
|
||||
username = ""
|
||||
password = ""
|
||||
} else {
|
||||
username := ""
|
||||
password := ""
|
||||
if c.Credentials != nil {
|
||||
username = c.Credentials.GetUsername()
|
||||
password = c.Credentials.GetPassword()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user