Remove password reset portal migration hint

This commit is contained in:
Tanner Collin 2021-11-15 06:14:54 +00:00
parent 04fa121fe9
commit be40624331
2 changed files with 5 additions and 25 deletions

View File

@ -639,12 +639,8 @@ class MyPasswordChangeSerializer(PasswordChangeSerializer):
class MyPasswordResetSerializer(PasswordResetSerializer): class MyPasswordResetSerializer(PasswordResetSerializer):
def validate_email(self, email): def validate_email(self, email):
if not User.objects.filter(email__iexact=email).exists(): if not User.objects.filter(email__iexact=email).exists():
if models.Member.objects.filter(old_email__iexact=email).exists(): logging.info('Email not found: ' + email)
logging.info('Email hasn\'t migrated to Spaceport yet: ' + email) raise ValidationError('Not found.')
raise ValidationError('Not on Spaceport.')
else:
logging.info('Email not found: ' + email)
raise ValidationError('Not found.')
return super().validate_email(email) return super().validate_email(email)
def save(self): def save(self):
@ -701,7 +697,8 @@ class MyPasswordResetConfirmSerializer(PasswordResetConfirmSerializer):
member = self.user.member member = self.user.member
logging.info('Password reset completed for: {} {} ({})'.format(member.first_name, member.last_name, member.id)) logging.info('Password reset completed for: {} {} ({})'.format(member.first_name, member.last_name, member.id))
if request_id: utils_stats.set_progress(request_id, 'Changing Spaceport password...') if request_id: utils_stats.set_progress(request_id, 'Success! You can now log in as: ' + self.user.username)
time.sleep(1) time.sleep(1)
super().save() super().save()

View File

@ -53,21 +53,6 @@ function ResetForm() {
/> />
} }
{error.email == 'Not on Spaceport.' &&
<Message
error
header={'You haven\'t registered to Spaceport yet'}
content={
<>
Please sign up to the new portal here:<br />
<Link to='/#outside-protospace-15c7b5'>
Spaceport Registration
</Link>
</>
}
/>
}
<Form.Button loading={loading} error={error.non_field_errors}> <Form.Button loading={loading} error={error.non_field_errors}>
Submit Submit
</Form.Button> </Form.Button>
@ -92,6 +77,7 @@ function ConfirmForm() {
const handleSubmit = (e) => { const handleSubmit = (e) => {
if (loading) return; if (loading) return;
setLoading(true); setLoading(true);
setProgress([]);
const request_id = token.slice(-10); const request_id = token.slice(-10);
const getStatus = () => { const getStatus = () => {
@ -111,8 +97,6 @@ function ConfirmForm() {
setLoading(false); setLoading(false);
setSuccess(true); setSuccess(true);
setError({}); setError({});
history.push('/');
window.scrollTo(0, 0);
}) })
.catch(err => { .catch(err => {
clearInterval(interval); clearInterval(interval);
@ -151,7 +135,6 @@ function ConfirmForm() {
<Form.Button loading={loading} error={error.non_field_errors}> <Form.Button loading={loading} error={error.non_field_errors}>
Submit Submit
</Form.Button> </Form.Button>
{success && <div>Success!</div>}
</Form> </Form>
); );
}; };