Update user's roles validation

pull/10616/head
Chris Goller 2017-03-10 18:06:06 -06:00
parent b078fa54fa
commit 43a12023f6
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ type usersResponse struct {
} }
func (r *userRequest) ValidUpdate() error { 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 fmt.Errorf("No fields to update")
} }
return validPermissions(&r.Permissions) return validPermissions(&r.Permissions)