git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45e4933
)
Registration: fix email content [public key format]
author
Yasin
<mohammed-yasin.rahman@lip6.fr>
Wed, 8 Jan 2014 14:18:05 +0000
(15:18 +0100)
committer
Yasin
<mohammed-yasin.rahman@lip6.fr>
Wed, 8 Jan 2014 14:18:05 +0000
(15:18 +0100)
portal/registrationview.py
patch
|
blob
|
history
diff --git
a/portal/registrationview.py
b/portal/registrationview.py
index
0002bf4
..
e85f7d5
100644
(file)
--- a/
portal/registrationview.py
+++ b/
portal/registrationview.py
@@
-106,6
+106,8
@@
class RegistrationView (FreeAccessView):
#keypair = re.sub("\n", "\\n", keypair)
#keypair = keypair.rstrip('\r\n')
#keypair = ''.join(keypair.split())
#keypair = re.sub("\n", "\\n", keypair)
#keypair = keypair.rstrip('\r\n')
#keypair = ''.join(keypair.split())
+ #for sending email: removing existing double qoute
+ public_key = public_key.replace('"', '');
else:
up_file = request.FILES['user_public_key']
file_content = up_file.read()
else:
up_file = request.FILES['user_public_key']
file_content = up_file.read()
@@
-120,6
+122,7
@@
class RegistrationView (FreeAccessView):
auth_type = 'user'
# for sending email
public_key = file_content
auth_type = 'user'
# for sending email
public_key = file_content
+ public_key = ''.join(public_key.split())
else:
errors.append('Please upload a valid RSA public key [.txt or .pub].')
else:
errors.append('Please upload a valid RSA public key [.txt or .pub].')
@@
-155,7
+158,7
@@
class RegistrationView (FreeAccessView):
'authority_hrn' : reg_auth,
'email' : reg_email,
'user_hrn' : user_hrn,
'authority_hrn' : reg_auth,
'email' : reg_email,
'user_hrn' : user_hrn,
- 'keypair' : 'Public Key
:
' + public_key,
+ 'keypair' : 'Public Key
:
' + public_key,
'cc_myself' : True # form.cleaned_data['cc_myself']
}
recipients = authority_get_pi_emails(request,reg_auth)
'cc_myself' : True # form.cleaned_data['cc_myself']
}
recipients = authority_get_pi_emails(request,reg_auth)