diff --git a/Makefile b/Makefile index 8b3ee64..130caa3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ +check: + cargo test + cargo fmt --check + cargo clippy + cargo build --release + run: SECURE_SESSIONS=false RUST_LOG=debug cargo run -- --reload-templates diff --git a/src/permissions.rs b/src/permissions.rs index 5590545..1a0062b 100644 --- a/src/permissions.rs +++ b/src/permissions.rs @@ -42,6 +42,14 @@ pub mod q { }; if row_count > 0 { + if row_count > 1 { + tracing::error!( + row_count = row_count, + user_id = user_id, + project_id = project_id, + "unexpected row count: more than one project membership for this user" + ) + } Ok(Decision::Allowed) } else { Ok(Decision::Denied)