Skip to content

Implement Admin user management UI #84

@fusion94

Description

@fusion94

Description

Build the admin-only UI for managing user accounts in the application.

Features

Users Page (/settings/users) — Admin Only

  • Table of all user accounts: email, display name, role, created date
  • Role badges (Admin / Member)
  • Action buttons: edit, delete
  • "Create User" button

Create User Dialog

  • Form fields: email, display name, password, confirm password, role (dropdown)
  • Password strength indicator (min 12 characters)
  • Zod validation from shared schemas
  • Success notification on creation
  • Copy temporary password option

Edit User Dialog

  • Pre-populated form with current user data
  • Optional password reset field (leave blank to keep current)
  • Role dropdown (cannot demote last admin — show disabled/warning)
  • Display name and email editable

Delete User Dialog

  • Confirmation with user's name/email
  • Warning about data ownership (bottles/notes added by this user)
  • Blocked for the last admin account
  • Blocked for self-deletion (cannot delete yourself)

Navigation

  • "Users" menu item visible only to admin users
  • Settings section with user management tab

Acceptance Criteria

  • Users page only accessible by admin users
  • User list displays all accounts
  • Create user form validates and submits
  • Edit user form pre-populates and updates
  • Delete requires confirmation
  • Last admin cannot be deleted or demoted
  • Role changes take effect immediately
  • Non-admin users don't see the Users menu item

References

  • PRD Section 3: US-13 (User Stories)
  • PRD Section 4: FR-7 (User Management)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions