feat: Phase 1 - user/password API extensions and auth route fix
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 5s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 5s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 10s
CI Pipeline / Build .deb & Release (push) Has been skipped
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 5s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 5s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 10s
CI Pipeline / Build .deb & Release (push) Has been skipped
This commit is contained in:
@ -13,7 +13,8 @@ pub use crypto::{decrypt, encrypt, load_or_create_key, CryptoError, KEY_PATH};
|
||||
pub use error::{AppError, ErrorResponse};
|
||||
pub use models::{
|
||||
AuthProvider, CreateGroupRequest, CreateHealthCheckRequest, CreateHostRequest,
|
||||
CreateUserRequest, DiscoveryCidrRequest, DiscoveryResult, Group, HealthCheck,
|
||||
ChangePasswordRequest, AdminResetPasswordRequest, CreateUserRequest,
|
||||
DiscoveryCidrRequest, DiscoveryResult, Group, HealthCheck,
|
||||
HealthCheckResult, HealthCheckWithResult, Host, HostHealthStatus, HostSummary,
|
||||
RegisterDiscoveredRequest, UpdateGroupRequest, UpdateHealthCheckRequest, UpdateUserRequest,
|
||||
User, UserRole as DbUserRole,
|
||||
|
||||
@ -251,6 +251,22 @@ pub struct UpdateUserRequest {
|
||||
pub email: Option<String>,
|
||||
pub role: Option<String>,
|
||||
pub is_active: Option<bool>,
|
||||
pub force_password_reset: Option<bool>,
|
||||
}
|
||||
|
||||
/// Self-service password change payload
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct ChangePasswordRequest {
|
||||
pub current_password: String,
|
||||
pub new_password: String,
|
||||
}
|
||||
|
||||
/// Admin password reset payload
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct AdminResetPasswordRequest {
|
||||
pub new_password: String,
|
||||
#[serde(default)]
|
||||
pub force_password_reset: bool,
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user