Compare commits
No commits in common. "ae1091c9a2810f775c6154ad15316beca845699e" and "afc23ae519a872867c074c2269cbefcaa6bd06c1" have entirely different histories.
ae1091c9a2
...
afc23ae519
@ -594,15 +594,9 @@ ORDER BY departure DESC
|
||||
let today = Local::now().date_naive();
|
||||
let day_diff = today - arr.date();
|
||||
let day_diff = day_diff.num_days();
|
||||
if day_diff >= 7 {
|
||||
if !user.has_role_tx(db, "admin").await
|
||||
&& !user
|
||||
.has_role_tx(db, "allow-retroactive-logbookentries")
|
||||
.await
|
||||
{
|
||||
if day_diff >= 7 && !user.has_role_tx(db, "admin").await {
|
||||
return Err(LogbookUpdateError::OnlyAllowedToEndTripsEndingToday);
|
||||
}
|
||||
}
|
||||
if day_diff < 0 && !user.has_role_tx(db, "admin").await {
|
||||
return Err(LogbookUpdateError::OnlyAllowedToEndTripsEndingToday);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user