diff --git a/src/services/identity/service.rs b/src/services/identity/service.rs index 83f461c..223bd67 100644 --- a/src/services/identity/service.rs +++ b/src/services/identity/service.rs @@ -766,6 +766,24 @@ impl Service<'_> { } }; + match m.state { + repositories::member::schema::MemberState::Normal => {} + _ => { + return Err(bcr::error::rpc::Error::InvalidParams( + bcr::error::rpc::InvalidParams { + message: "not permitted username".to_string(), + detail: bcr::error::rpc::InvalidParamsDetail { + location: "request".to_string(), + param: "username".to_string(), + value: username, + error_type: bcr::error::rpc::InvalidParamsType::None, + message: "cannot signin".to_string(), + }, + }, + )); + } + } + if !(argon2::verify_encoded(&m.password, password.as_bytes()).map_err(|e| { bcr::error::rpc::Error::InvalidParams(bcr::error::rpc::InvalidParams { message: "invalid password".to_string(),