rename role to manage_events
This commit is contained in:
@ -9,9 +9,9 @@ use crate::{
|
||||
};
|
||||
|
||||
pub mod boat;
|
||||
pub mod event;
|
||||
pub mod mail;
|
||||
pub mod notification;
|
||||
pub mod planned_event;
|
||||
pub mod schnupper;
|
||||
pub mod user;
|
||||
|
||||
@ -80,7 +80,7 @@ pub fn routes() -> Vec<Route> {
|
||||
ret.append(&mut boat::routes());
|
||||
ret.append(&mut notification::routes());
|
||||
ret.append(&mut mail::routes());
|
||||
ret.append(&mut planned_event::routes());
|
||||
ret.append(&mut event::routes());
|
||||
ret.append(&mut routes![rss, show_rss, show_list, list]);
|
||||
ret
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ async fn index(
|
||||
|
||||
let mut context = Context::new();
|
||||
|
||||
if user.has_role(db, "cox").await || user.has_role(db, "planned_event").await {
|
||||
if user.has_role(db, "cox").await || user.has_role(db, "manage_events").await {
|
||||
let triptypes = TripType::all(db).await;
|
||||
context.insert("trip_types", &triptypes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user