Add warning about DEV mode when calling userinfo

This commit is contained in:
Abin Simon
2022-04-14 16:50:52 +05:30
parent 5d5b097770
commit 309b1a4bda

View File

@@ -466,6 +466,7 @@ func (s *userService) GetUserInfo(ctx context.Context, user *userv3.User) (*user
if s.dev {
username = user.GetMetadata().GetName()
if len(username) == 0 {
fmt.Println("Unable to fetch username. Don't use DEV mode when using from UI.")
return &userv3.UserInfo{}, fmt.Errorf("username should be provided")
}
} else {