@@ -759,17 +759,23 @@ def parse_initial_users_from_aws_secret_json(self, secret_json):
759759 for (email , csv ) in secret_json .items ():
760760 values = csv .split ("," )
761761
762- if len (values ) != 3 :
763- raise Exception (f"Wrong number of CSV values for { email } (expected 3 but got { len (values )} )" )
762+ if len (values ) != 3 and len ( values ) != 4 :
763+ raise Exception (f"Wrong number of CSV values for { email } (expected 3 or 4 but got { len (values )} )" )
764764
765765 user_type = values [0 ].strip ()
766766 given_name = values [1 ].strip ()
767767 family_name = values [2 ].strip ()
768768
769+ if len (values ) == 4 :
770+ id = values [3 ].strip ()
771+ else :
772+ id = email
773+
769774 user = {
770775 "email" : email ,
771776 "given_name" : given_name ,
772- "family_name" : family_name
777+ "family_name" : family_name ,
778+ "id" : id
773779 }
774780 if user_type == "primary" :
775781 primary .append (user )
@@ -880,6 +886,7 @@ def create_initial_user_for_saas(self, user, user_type):
880886 is_workspace_admin = True
881887 application_role = "ADMIN"
882888 facilities_role = "PREMIUM"
889+ manage_role = "MANAGEUSER"
883890 # TODO: check which security groups primary users should be members of
884891 manage_security_groups = ["MAXADMIN" ]
885892 elif user_type == "SECONDARY" :
@@ -896,6 +903,7 @@ def create_initial_user_for_saas(self, user, user_type):
896903 is_workspace_admin = False
897904 application_role = "USER"
898905 facilities_role = "BASE"
906+ manage_role = "MANAGEUSER"
899907 # TODO: check which security groups secondary users should be members of
900908 manage_security_groups = []
901909 else :
@@ -930,9 +938,8 @@ def create_initial_user_for_saas(self, user, user_type):
930938 for mas_application_id in self .mas_workspace_application_ids :
931939 self .await_mas_application_availability (mas_application_id )
932940 if mas_application_id == "manage" :
933- # special case for manage; role is always "MANAGEUSER"
934- role = "MANAGEUSER"
935- if mas_application_id == "facilities" :
941+ role = manage_role
942+ elif mas_application_id == "facilities" :
936943 role = facilities_role
937944 else :
938945 # otherwise grant the user the appropriate role for their user_type
0 commit comments