backend adaptations due to cox change role
This commit is contained in:
@ -119,7 +119,7 @@ impl Boat {
|
||||
return true;
|
||||
}
|
||||
|
||||
user.has_role(db, "cox").await
|
||||
user.allowed_to_steer(db).await
|
||||
}
|
||||
|
||||
pub async fn shipmaster_allowed_tx(
|
||||
@ -135,7 +135,7 @@ impl Boat {
|
||||
return true;
|
||||
}
|
||||
|
||||
user.has_role_tx(db, "cox").await
|
||||
user.allowed_to_steer_tx(db).await
|
||||
}
|
||||
|
||||
pub async fn is_locked(&self, db: &SqlitePool) -> bool {
|
||||
@ -260,7 +260,7 @@ ORDER BY
|
||||
if user.has_role(db, "admin").await {
|
||||
return Self::all(db).await;
|
||||
}
|
||||
let mut boats = if user.has_role(db, "cox").await {
|
||||
let mut boats = if user.allowed_to_steer(db).await {
|
||||
sqlx::query_as!(
|
||||
Boat,
|
||||
"
|
||||
|
Reference in New Issue
Block a user