auth: use "sort.Strings" instead of StringSlice

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
release-3.3
Gyuho Lee 2017-12-04 14:09:27 -08:00
parent 198d8d6b24
commit 645c7c9a92
1 changed files with 1 additions and 1 deletions

View File

@ -458,7 +458,7 @@ func (as *authStore) UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUser
}
user.Roles = append(user.Roles, r.Role)
sort.Sort(sort.StringSlice(user.Roles))
sort.Strings(user.Roles)
putUser(tx, user)