# Toggle User Status

## User Story

As a user with the appropriate role, I want to activate or deactivate a user account, so that I can control system access.

## Story Diagram

```mermaid
flowchart TD
    A[Open User Detail] --> B{Current status}
    B -- ACTIVE --> C[Click Deactivate]
    B -- INACTIVE --> D[Click Reactivate]
    C --> E[Confirm]
    D --> E
    E --> F[Status changed]
```

## Scenario Patterns

- Deactivate an ACTIVE user account
- Reactivate an INACTIVE user account
- Cannot deactivate own account

## Test Cases

- Open the detail page for an ACTIVE user and click Deactivate; verify the user's status changes to INACTIVE
- Open the detail page for an INACTIVE user and click Reactivate; verify the user's status changes to ACTIVE
- Open the detail page for the currently authenticated user; verify the Deactivate action is not available

## Screens

- [user-detail](../../../screen/user-detail.md)

## Resolvers

- [deactivateUser](../../../resolver/deactivateUser.md)
- [reactivateUser](../../../resolver/reactivateUser.md)
