Skip to content

Commit 36c0f1f

Browse files
committed
hotfix professor role
1 parent f74114d commit 36c0f1f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/shared/infra/repositories/booking_repository_dynamo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ def delete_booking(self, booking_id: str, user) -> Optional[Booking]:
137137
return None
138138

139139
is_admin = user_role == 'ADMIN'
140+
is_professor = user_role == 'PROFESSOR'
140141
is_owner = user_role == 'STUDENT' and booking.user_id == user_id
141142

142-
if is_admin or is_owner:
143+
if is_admin or is_owner or is_professor:
143144
deleted = self.dynamo.delete_item(
144145
partition_key=self.booking_partition_key_format(),
145146
sort_key=self.booking_sort_key_format(booking_id)

0 commit comments

Comments
 (0)