projects
/
astakos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0a56919
)
fix third-party signup form email validation sequence
author
Sofia Papagiannaki
<papagian@gmail.com>
Sat, 21 Apr 2012 20:32:31 +0000
(23:32 +0300)
committer
Sofia Papagiannaki
<papagian@gmail.com>
Sat, 21 Apr 2012 20:32:31 +0000
(23:32 +0300)
snf-astakos-app/astakos/im/forms.py
patch
|
blob
|
history
diff --git
a/snf-astakos-app/astakos/im/forms.py
b/snf-astakos-app/astakos/im/forms.py
index
c736246
..
8afce79
100644
(file)
--- a/
snf-astakos-app/astakos/im/forms.py
+++ b/
snf-astakos-app/astakos/im/forms.py
@@
-211,8
+211,6
@@
class ThirdPartyUserCreationForm(forms.ModelForm):
email = self.cleaned_data['email']
if not email:
raise forms.ValidationError(_("This field is required"))
email = self.cleaned_data['email']
if not email:
raise forms.ValidationError(_("This field is required"))
- if reserved_email(email):
- raise forms.ValidationError(_("This email is already used"))
return email
def clean_has_signed_terms(self):
return email
def clean_has_signed_terms(self):
@@
-261,11
+259,10
@@
class InvitedThirdPartyUserCreationForm(ThirdPartyUserCreationForm):
class ShibbolethUserCreationForm(ThirdPartyUserCreationForm):
def clean_email(self):
email = self.cleaned_data['email']
class ShibbolethUserCreationForm(ThirdPartyUserCreationForm):
def clean_email(self):
email = self.cleaned_data['email']
- if not email:
- raise forms.ValidationError(_("This field is required"))
for user in AstakosUser.objects.filter(email = email):
if user.provider == 'shibboleth':
raise forms.ValidationError(_("This email is already associated with another shibboleth account."))
for user in AstakosUser.objects.filter(email = email):
if user.provider == 'shibboleth':
raise forms.ValidationError(_("This email is already associated with another shibboleth account."))
+ super(ShibbolethUserCreationForm, self).clean_email()
return email
class InvitedShibbolethUserCreationForm(ShibbolethUserCreationForm, InvitedThirdPartyUserCreationForm):
return email
class InvitedShibbolethUserCreationForm(ShibbolethUserCreationForm, InvitedThirdPartyUserCreationForm):