Merge pull request #998 from influxdata/hotfix/fix-user-rolevalidation

Update user's roles validation
pull/993/head^2
Chris Goller 2017-03-10 18:10:50 -06:00 committed by GitHub
commit 07192d89d8
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ type usersResponse struct {
}
func (r *userRequest) ValidUpdate() error {
if r.Password == "" && len(r.Permissions) == 0 {
if r.Password == "" && len(r.Permissions) == 0 && len(r.Roles) == 0 {
return fmt.Errorf("No fields to update")
}
return validPermissions(&r.Permissions)