start working on calculating member fees
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m54s
CI/CD Pipeline / deploy-staging (push) Successful in 4m20s
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-01-18 21:36:38 +01:00
parent dc794bde37
commit 474db1232d
3 changed files with 47 additions and 4 deletions

View File

@ -625,7 +625,10 @@ impl<'r> FromRequest<'r> for DonauLinzUser {
let db = req.rocket().state::<SqlitePool>().unwrap();
match User::from_request(req).await {
Outcome::Success(user) => {
if user.has_role(db, "Donau Linz").await {
if user.has_role(db, "Donau Linz").await
&& !user.has_role(db, "Unterstützend").await
&& !user.has_role(db, "Förderndes Mitglied").await
{
Outcome::Success(DonauLinzUser(user))
} else {
Outcome::Error((Status::Forbidden, LoginError::NotACox))