git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scheduler: adding/removing resources enforce warnings and recount number of unconfigu...
[unfold.git]
/
portal
/
registrationview.py
diff --git
a/portal/registrationview.py
b/portal/registrationview.py
index
8749f53
..
2ce1efa
100644
(file)
--- a/
portal/registrationview.py
+++ b/
portal/registrationview.py
@@
-44,8
+44,12
@@
class RegistrationView (FreeAccessView, ThemeView):
# REGISTRY ONLY TO BE REMOVED WITH MANIFOLD-V2
authorities_query = Query.get('authority').select('name', 'authority_hrn')
authorities = execute_admin_query(wsgi_request, authorities_query)
# REGISTRY ONLY TO BE REMOVED WITH MANIFOLD-V2
authorities_query = Query.get('authority').select('name', 'authority_hrn')
authorities = execute_admin_query(wsgi_request, authorities_query)
+ print "RegistrationView authorities = ", authorities
if authorities is not None:
if authorities is not None:
- authorities = sorted(authorities, key=lambda k: k['name'])
+ # Remove the root authority from the list
+ matching = [s for s in authorities if "." in s['authority_hrn']]
+ authorities = sorted(matching, key=lambda k: k['authority_hrn'])
+ authorities = sorted(matching, key=lambda k: k['name'])
print "############ BREAKPOINT 1 #################"
# Page rendering
print "############ BREAKPOINT 1 #################"
# Page rendering
@@
-80,12
+84,12
@@
class RegistrationView (FreeAccessView, ThemeView):
'current_site' : current_site,
'email_hash' : email_hash,
'pi' : '',
'current_site' : current_site,
'email_hash' : email_hash,
'pi' : '',
- 'validation_link':
'https://' +
current_site + '/portal/email_activation/'+ email_hash
+ 'validation_link': current_site + '/portal/email_activation/'+ email_hash
}
print "############ BREAKPOINT 4 #################"
auth = wsgi_request.POST.get('org_name', None)
}
print "############ BREAKPOINT 4 #################"
auth = wsgi_request.POST.get('org_name', None)
- if auth is None:
+ if auth is None
or auth == ""
:
errors.append('Organization required: please select one or request its addition')
else:
errors.append('Organization required: please select one or request its addition')
else:
@@
-138,7
+142,7
@@
class RegistrationView (FreeAccessView, ThemeView):
# sqlite3 /var/unfold/unfold.sqlite3
# select email from auth_user;
if UserModel._default_manager.filter(email__iexact = user_request['email']):
# sqlite3 /var/unfold/unfold.sqlite3
# select email from auth_user;
if UserModel._default_manager.filter(email__iexact = user_request['email']):
- errors.append('<a href="/contact">Contact
OneLab
support</a> or try with another email.')
+ errors.append('<a href="/contact">Contact support</a> or try with another email.')
# XXX TODO: Factorize with portal/accountview.py
# XXX TODO: Factorize with portal/registrationview.py
# XXX TODO: Factorize with portal/accountview.py
# XXX TODO: Factorize with portal/registrationview.py