From: Loic Baron Date: Thu, 24 Jul 2014 16:11:24 +0000 (+0200) Subject: Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab X-Git-Tag: myslice-1.0~45^2^2~2^2~1 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=e17c4ff5fd80bb24573047eb832ea6ca5c2fc73e;hp=-c;p=unfold.git Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab --- e17c4ff5fd80bb24573047eb832ea6ca5c2fc73e diff --combined portal/actions.py index 3a5fcbc3,3f3ae56f..d62f9941 --- a/portal/actions.py +++ b/portal/actions.py @@@ -321,14 -321,13 +321,14 @@@ def portal_validate_request(wsgi_reques # XXX tmp sfa dependency from sfa.util.xrn import Xrn urn = Xrn(hrn, request['type']).get_urn() - + + # Only hrn is required for Manifold Query sfa_authority_params = { - 'hrn' : hrn, - 'urn' : urn, - 'type' : request['type'], + 'authority_hrn' : hrn, + #'authority_urn' : urn, + #'type' : request['type'], #'pi' : None, - 'enabled' : True + #'enabled' : True } print "ADD Authority" sfa_add_authority(wsgi_request, sfa_authority_params) @@@ -377,6 -376,8 +377,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 = { @@@ -392,6 -393,13 +394,13 @@@ 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): @@@ -506,6 -514,10 +515,10 @@@ def sfa_create_user(wsgi_request, reque 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):