- # The recipients are the PI of the authority
- #recipients = authority_get_pi_emails(request, authority_hrn)
- recipients = ["support@myslice.info"]
- requester = request.user # current user
- sender = 'yasin.upmc@gmail.com' # the server email
- msg = "OneLab user %s requested account in omf:nitos Platform" % requester
- send_mail("Onelab user %s requested an account in OMF:NITOS"%requester , msg, sender, recipients)
- messages.info(request, 'Request to get access on OMF:NITOS platform received. Please wait for PI\'s reply.')
+ for platform_detail in platform_details:
+ if platform_detail['platform'] == "omf":
+ platform_id = platform_detail['platform_id']
+ user_params = {'platform_id': platform_id, 'user_id': user_id, 'auth_type': "reference", 'config': '{"reference_platform": "myslice"}'}
+ manifold_add_account(request,user_params)
+ messages.info(request, 'Reference Account added on OMF:Nitos platform. You have now access to OMF:Nitos resources.')