limit users to proper role, Fixes #135
This commit is contained in:
@@ -264,6 +264,10 @@ ORDER BY departure DESC
|
||||
return Err(LogbookCreateError::BoatNotFound);
|
||||
};
|
||||
|
||||
if boat.amount_seats == 1 && log.rowers.is_empty() {
|
||||
log.rowers = vec![created_by_user.id];
|
||||
}
|
||||
|
||||
if boat.amount_seats == 1 {
|
||||
log.shipmaster = Some(log.rowers[0]);
|
||||
log.steering_person = Some(log.rowers[0]);
|
||||
|
Reference in New Issue
Block a user