From: Yasin Date: Thu, 24 Jul 2014 15:58:57 +0000 (+0200) Subject: testbed list: make it uppercase. Actions: send confirmation email on user validation X-Git-Tag: myslice-1.0~45^2~3 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=1b0ffac48bfd7571a8092e2be8886e53ca680082 testbed list: make it uppercase. Actions: send confirmation email on user validation --- diff --git a/plugins/testbeds/templates/testbeds.html b/plugins/testbeds/templates/testbeds.html index d670c9db..22f7f0ac 100644 --- a/plugins/testbeds/templates/testbeds.html +++ b/plugins/testbeds/templates/testbeds.html @@ -14,4 +14,11 @@ + + diff --git a/portal/actions.py b/portal/actions.py index 3479c02b..3f3ae56f 100644 --- a/portal/actions.py +++ b/portal/actions.py @@ -376,6 +376,8 @@ def create_slice(wsgi_request, request): # Add User to Slice if we have the user_hrn in pendingslice table user_hrn = request.get('user_hrn', None) user_hrns = list([user_hrn]) if user_hrn else list() + + user_email = request.get # XXX We should create a slice with Manifold terminology slice_params = { @@ -391,6 +393,13 @@ def create_slice(wsgi_request, request): results = execute_query(wsgi_request, query) if not results: raise Exception, "Could not create %s. Already exists ?" % slice_params['hrn'] + ## We do not store the email in pendingslice table. As a result receiver's email is unknown ## + ## Need modification in pendingslice table ### + #else: + # subject = 'Slice created' + # msg = 'A manager of your institution has validated your slice request. You can now add resources to the slice and start experimenting.' + # send_mail(subject, msg, 'support@onelab.eu',['yasin.upmc@gmail.com'], fail_silently=False) + return results def create_pending_slice(wsgi_request, request, email): @@ -505,6 +514,10 @@ def sfa_create_user(wsgi_request, request): results = execute_query(wsgi_request, query) if not results: raise Exception, "Could not create %s. Already exists ?" % sfa_user_params['user_hrn'] + else: + subject = 'User validated' + msg = 'A manager of your institution has validated your account. You have now full user access to the portal.' + send_mail(subject, msg, 'support@onelab.eu',[request['email']], fail_silently=False) return results def create_user(wsgi_request, request):