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,10 +639,6 @@ class MyPasswordChangeSerializer(PasswordChangeSerializer):
class MyPasswordResetSerializer(PasswordResetSerializer):
def validate_email(self, email):
if not User.objects.filter(email__iexact=email).exists():
if models.Member.objects.filter(old_email__iexact=email).exists():
logging.info('Email hasn\'t migrated to Spaceport yet: ' + email)
raise ValidationError('Not on Spaceport.')
else:
logging.info('Email not found: ' + email)
raise ValidationError('Not found.')
return super().validate_email(email)
@ -701,7 +697,8 @@ class MyPasswordResetConfirmSerializer(PasswordResetConfirmSerializer):
member = self.user.member
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)
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}>
Submit
</Form.Button>
@ -92,6 +77,7 @@ function ConfirmForm() {
const handleSubmit = (e) => {
if (loading) return;
setLoading(true);
setProgress([]);
const request_id = token.slice(-10);
const getStatus = () => {
@ -111,8 +97,6 @@ function ConfirmForm() {
setLoading(false);
setSuccess(true);
setError({});
history.push('/');
window.scrollTo(0, 0);
})
.catch(err => {
clearInterval(interval);
@ -151,7 +135,6 @@ function ConfirmForm() {
<Form.Button loading={loading} error={error.non_field_errors}>
Submit
</Form.Button>
{success && <div>Success!</div>}
</Form>
);
};