add new user fields to grpc and list command (#2202)

Updates #2166

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2024-10-18 08:20:03 -06:00 committed by GitHub
parent b6dc6eb36c
commit 028d9aab73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 129 additions and 52 deletions

View file

@ -100,11 +100,16 @@ func (u *User) TailscaleUserProfile() tailcfg.UserProfile {
}
}
func (n *User) Proto() *v1.User {
func (u *User) Proto() *v1.User {
return &v1.User{
Id: strconv.FormatUint(uint64(n.ID), util.Base10),
Name: n.Name,
CreatedAt: timestamppb.New(n.CreatedAt),
Id: strconv.FormatUint(uint64(u.ID), util.Base10),
Name: u.Name,
CreatedAt: timestamppb.New(u.CreatedAt),
DisplayName: u.DisplayName,
Email: u.Email,
ProviderId: u.ProviderIdentifier,
Provider: u.Provider,
ProfilePicUrl: u.ProfilePicURL,
}
}