diff --git a/authservice/src/db/user.rs b/authservice/src/db/user.rs index 989b58d..106060b 100644 --- a/authservice/src/db/user.rs +++ b/authservice/src/db/user.rs @@ -458,7 +458,7 @@ pub async fn user_count(db: &DatabaseConnection) -> Result Result { // dont fucking touch this, i don't know why it works but it does, it's actually evil // note: doesn't work - Ok(user::Entity::find().filter(user::Column::Flags.into_expr().binary(BinOper::LShift, Expr::value(63 - 2)).lt(1 << (63 - 2))) + Ok(user::Entity::find().filter(user::Column::Flags.into_expr().binary(BinOper::BitAnd, UserFlag::Administrator as i64).binary(BinOper::NotEqual, 0)) .count(db).await.map_err(|e| { error!("DATABASE ERROR WHILE ADMINCOUNT: {e}"); FetchUserError::DatabaseError diff --git a/docker-compose.yml b/docker-compose.yml index 7d8bca1..73cc7b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,7 +77,7 @@ services: - db env_file: ".env" image: nats:2.11.8 - cmd: "nats-server -js" + command: "-js" db: image: postgres:17 networks: