allow non-cox to create ergo-trips
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-11-25 12:12:36 +01:00
parent 9d3b1d522b
commit 1f0b74554f
8 changed files with 82 additions and 25 deletions

View File

@ -29,7 +29,10 @@ async fn index(
let mut context = Context::new();
if user.allowed_to_steer(db).await || user.has_role(db, "manage_events").await {
if user.allowed_to_steer(db).await
|| user.has_role(db, "manage_events").await
|| user.has_role(db, "ergo").await
{
let triptypes = TripType::all(db).await;
context.insert("trip_types", &triptypes);
}