-
-
Notifications
You must be signed in to change notification settings - Fork 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
allow registration without invite link #2799
allow registration without invite link #2799
Conversation
757037d
to
1e7f2d5
Compare
@@ -121,12 +117,12 @@ async fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult { | |||
user_org.save(&conn).await?; | |||
} | |||
user | |||
} else if EmergencyAccess::find_invited_by_grantee_email(&email, &conn).await.is_some() { | |||
} else if CONFIG.is_signup_allowed(&email) | |||
|| EmergencyAccess::find_invited_by_grantee_email(&email, &conn).await.is_some() |
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.
The check for EmergencyAccess might be redundant in practice. I've enabled it because this way it matches the behavior of organization invites. E.g. if you allow invites, invite someone and then disable invites and disallow signup, invited users can still complete their registration. same for emergency access invites. - If we only want that for invites we should drop it to make the logic easier.
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.
I think this is ok.
Unless someone else thinks this still should return an error.
but i think all checks are done correctly and should block signups if they are disabled and the user in question didn't received an invite at all.
ee66af9
to
75de2d7
Compare
if signups are allowed invited users should be able to complete their registration even when they don't have the invite link at hand.
75de2d7
to
aa5a059
Compare
if signups are allowed invited users should be able to complete their registration even when they don't have the invite link at hand.
fixes #2800