Set ID on retrieved user from boltdb

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
pull/2114/head
Michael de Sa 2017-10-12 17:56:25 -04:00 committed by Jared Scheib
parent 7f4af358ae
commit 4761f4454c
2 changed files with 2 additions and 0 deletions

View File

@ -414,6 +414,7 @@ func MarshalUser(u *chronograf.User) ([]byte, error) {
roles[i] = role.Name
}
return MarshalUserPB(&User{
ID: u.ID,
Name: u.Name,
Provider: u.Provider,
Scheme: u.Scheme,

View File

@ -69,6 +69,7 @@ func (s *UsersStore) Add(ctx context.Context, u *chronograf.User) (*chronograf.U
if err != nil {
return err
}
u.ID = seq
if v, err := internal.MarshalUser(u); err != nil {
return err
} else if err := b.Put(u64tob(seq), v); err != nil {