Skip to content

SANDBOX-1845 | Lookup user signups by email - #156

Open
MikelAlejoBR wants to merge 1 commit into
kubesaw:masterfrom
MikelAlejoBR:SANDBOX-1845-lookup-user-signup-mail
Open

SANDBOX-1845 | Lookup user signups by email#156
MikelAlejoBR wants to merge 1 commit into
kubesaw:masterfrom
MikelAlejoBR:SANDBOX-1845-lookup-user-signup-mail

Conversation

@MikelAlejoBR

Copy link
Copy Markdown

Since the emails are hashed, looking up users by their email meant that we had to figure a way to hash the emails to then attempt to get their user signups. This command does that for us.

Assisted-by: Cursor with Opus 4.6
Jira-ticket: SANDBOX-1845

Since the emails are hashed, looking up users by their email meant that
we had to figure a way to hash the emails to then attempt to get their
user signups. This command does that for us.

Assisted-by: Cursor with Opus 4.6
Jira-ticket: SANDBOX-1845

@alexeykazakov alexeykazakov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment thread pkg/cmd/user_info.go

// No user signups? It means that it was not found.
if len(userSignups.Items) == 0 {
return fmt.Errorf(`user signup not found with email "%s"`, email)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically it's not an error if no users found. Shouldn't we just print that no user with such email found?

Comment thread pkg/cmd/user_info.go
return fmt.Errorf(`user signup not found with email "%s"`, email)
}

return ctx.PrintObject(&userSignups.Items[0], "UserSignup")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They maybe multiple users with the same email. Our SSO supports it.

Comment thread pkg/cmd/user_info.go
Comment on lines +17 to +18
Use: "user-info <email>",
Short: "Get the user signup by email",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea 👍
I'm wondering, how about extending the existing get sub-command with an optional --email flag that would use the provided email, hash it, and include it as a label selector?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants