diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-09-30 16:33:01 -0400 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-10-01 14:42:32 -0400 |
commit | 5b70b8f1b8bbbe6aeec43b8d8dfdc6b7cc68bc9c (patch) | |
tree | 03670c3a69ec3dd277efc40bbddd154549b32898 /src/api | |
parent | 529b2521627b17142284c55c744812129edc71e8 (diff) |
Fixes for collaborator field
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Change-Id: I3dbdedf26fa84617ea7680a0f99e032d88f1ea98
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/models.py b/src/api/models.py index ec163a1..1f03deb 100644 --- a/src/api/models.py +++ b/src/api/models.py @@ -378,17 +378,17 @@ class GeneratedCloudConfig(models.Model): """ user_array = ["default"] users = list(self.booking.collaborators.all()) - users.append(self.booking.owner.userprofile) + users.append(self.booking.owner) for collaborator in users: userdict = {} # TODO: validate if usernames are valid as linux usernames (and provide an override potentially) - userdict['name'] = self._normalize_username(collaborator.user.username) + userdict['name'] = self._normalize_username(collaborator.username) userdict['groups'] = "sudo" userdict['sudo'] = "ALL=(ALL) NOPASSWD:ALL" - userdict['ssh_authorized_keys'] = [self._get_ssh_string(collaborator.user.username)] + userdict['ssh_authorized_keys'] = [self._get_ssh_string(collaborator.username)] user_array.append(userdict) |