Posix compliant username is shown in booking details 50/73150/3
authorRaven Hodgdon <jhodgdon@iol.unh.edu>
Tue, 4 Jan 2022 21:50:19 +0000 (16:50 -0500)
committerRaven Hodgdon <jhodgdon@iol.unh.edu>
Thu, 10 Feb 2022 19:43:08 +0000 (14:43 -0500)
Signed-off-by: jhodgdon <jhodgdon@iol.unh.edu>
Change-Id: I35445f771e73bfaf5d552492fd4086bbc1321228

src/booking/views.py
src/templates/base/booking/booking_detail.html

index 940428b..367a18d 100644 (file)
@@ -24,7 +24,7 @@ from booking.models import Booking
 from booking.stats import StatisticsManager
 from booking.forms import HostReImageForm
 from workflow.forms import FormUtils
-from api.models import JobFactory
+from api.models import JobFactory, GeneratedCloudConfig
 from workflow.views import login
 from booking.forms import QuickBookingForm
 from booking.quick_deployer import create_from_form, drop_filter
@@ -167,7 +167,8 @@ def booking_detail_view(request, booking_id):
         'booking': booking,
         'pdf': booking.pdf,
         'user_id': user.id,
-        'image_mapping': build_image_mapping(booking.lab, user)
+        'image_mapping': build_image_mapping(booking.lab, user),
+        'posix_username': GeneratedCloudConfig._normalize_username(None, user.username)
     }
 
     return render(
index 4a8f35a..70958f6 100644 (file)
@@ -23,6 +23,10 @@ code {
             </div>
             <div class="collapse show" id="panel_overview">
                 <table class="table m-0">
+                    <tr>
+                        <td>Username</td>
+                        <td>{{  posix_username  }}</td>
+                    </tr>
                     <tr>
                         <td>Purpose</td>
                         <td>{{ booking.purpose }}</td>