Browse Source

security: fix var shadowing in CreateOrUpdateUser

Yicheng Qin 10 years ago
parent
commit
8335a5407b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdserver/security/security.go

+ 1 - 1
etcdserver/security/security.go

@@ -115,7 +115,7 @@ func (s *Store) GetUser(name string) (User, error) {
 }
 
 func (s *Store) CreateOrUpdateUser(user User) (User, error) {
-	user, err := s.GetUser(user.User)
+	_, err := s.GetUser(user.User)
 	if err == nil {
 		// Remove the update-user roles from updating downstream.
 		// Roles are granted or revoked, not changed directly.