Commit 88e44bb7 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: only add a project assignment for the existing admin user

parent aaac9c2b
...@@ -202,13 +202,6 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -202,13 +202,6 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
admin_user.newContent( admin_user.newContent(
portal_type="ERP5 Login", portal_type="ERP5 Login",
reference="admin_user").validate() reference="admin_user").validate()
admin_user.newContent(
portal_type='Assignment',
destination_project_value=project,
function='computer/manager'
).open()
admin_user.edit( admin_user.edit(
first_name="Admin User", first_name="Admin User",
reference="Admin_user", reference="Admin_user",
...@@ -216,9 +209,18 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans ...@@ -216,9 +209,18 @@ return dict(vads_url_already_registered="%s/already_registered" % (payment_trans
) )
admin_user.validate() admin_user.validate()
self.admin_user = admin_user
else: else:
self.admin_user = admin_user_login.getParentValue() admin_user = admin_user_login.getParentValue()
admin_user.newContent(
portal_type='Assignment',
destination_project_value=project,
function='computer/manager'
).open()
self.admin_user = admin_user
def createNormalUser(self, email, name, language): def createNormalUser(self, email, name, language):
""" Create a Normal user """ """ Create a Normal user """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment