rename role to manage_events
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m44s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-05-28 10:46:21 +02:00
parent 91fa2a7762
commit c0d766832e
7 changed files with 16 additions and 14 deletions

View File

@ -1190,7 +1190,7 @@ impl<'r> FromRequest<'r> for EventUser {
let db = req.rocket().state::<SqlitePool>().unwrap();
match User::from_request(req).await {
Outcome::Success(user) => {
if user.has_role(db, "planned_event").await {
if user.has_role(db, "manage_events").await {
Outcome::Success(EventUser(user))
} else {
Outcome::Error((Status::Forbidden, LoginError::NotACox))