-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[server] Stop signup for blocklisted email domains #9385
Conversation
06f3210
to
2a11329
Compare
@@ -34,6 +34,7 @@ export async function trackSignup(user: User, request: Request, analytics: IAnal | |||
properties: { | |||
auth_provider: user.identities[0].authProviderId, | |||
qualified: !!request.cookies["gitpod-marketing-website-visited"], | |||
blocked: user.blocked, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakobhero I added this property. Does that require any work from your side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @geropl, thanks for looping me in! this does not cause any issues downstream, i will update the tracking plan with the additional property.
Stealing this review as Alex is on holidays 😁 |
I did not get blocked 😬 (even though my Did this accidentally get redeployed, or am I doing something wrong? |
@jankeromnes please check the DB to see if the branch is properly set up. @geropl, @aledbf and I are currently busy blocking miners. This would really really help. Can you try and push this change forward as quickly as possible? |
Okay, given the urgency, will push this forward. |
/werft run 👍 started the job as gitpod-build-gpl-6285-edomains.5 |
/werft run with-clean-slate-deployment=true 👍 started the job as gitpod-build-gpl-6285-edomains.6 |
/werft run 👍 started the job as gitpod-build-gpl-6285-edomains.8 |
/werft run 👍 started the job as gitpod-build-gpl-6285-edomains.9 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and works as intended!
But we should really rename filter
to something much less subtle. 🤪
@@ -142,7 +152,8 @@ export class UserService { | |||
this.config.blockNewUsers.passlist.some((e) => mail.endsWith(`@${e}`)); | |||
const canPass = newUser.identities.some((i) => !!i.primaryEmail && emailDomainInPasslist(i.primaryEmail)); | |||
|
|||
newUser.blocked = !canPass; | |||
// blocked = if user already blocked OR is not allowed to pass | |||
newUser.blocked = newUser.blocked || !canPass; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -25,7 +25,7 @@ export class EMailDomainServiceImpl implements EMailDomainService { | |||
|
|||
async isBlocked(email: string): Promise<boolean> { | |||
const { domain } = this.parseMail(email); | |||
return !this.domainFilterDb.filter(domain); | |||
return !(await this.domainFilterDb.filter(domain)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😵
Description
Related Issue(s)
Fixes #6285
How to test
Release Notes
Documentation