Add ability to disable/enable users#46
Conversation
WalkthroughAdds a Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant AuthAPI as Auth API
participant Model as UpdateUserBody
participant Provider as Auth Provider
Client->>AuthAPI: update_user(uid, UpdateUserValues{ disabled: Some(true/false), ... })
AuthAPI->>Model: from_values(values)
Note right of Model #dfe7ff: include `disable_user` when `Some(...)`
Model->>Provider: PATCH /users:uid { disable_user: true/false, ... }
Provider-->>AuthAPI: 200 OK (user updated)
AuthAPI-->>Client: Result<User>
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
src/auth/mod.rs(1 hunks)src/auth/models/update_user.rs(4 hunks)
🔇 Additional comments (2)
src/auth/models/update_user.rs (2)
9-9: Addingdisabled: Option<bool>to values is spot onMatches the API semantics (unset = no-op; true = disable; false = enable). No issues.
75-80: Correct mapping from values to bodyPassing through
values.disabledtodisable_useris correct.
ae57017 to
78f7437
Compare
Adds support for disabling and enabling user accounts via the
disabled()method onUpdateUserValues.Summary by CodeRabbit
New Features
Documentation
Chores