As an administrator, I want to create and view users so that I can manage who can log in and own SSH keys.
Acceptance Criteria (G/W/T)
Given an admin token, when I POST /api/v1/users with email, password, role, then a user row is created with hashed password and returned (sans hash).
Given multiple users exist, when I GET /api/v1/users as admin, then I see a paginated list (email, role, is_active).
Given a user id, when I GET /api/v1/users/{id} as admin, then I see user details (no password).
Given invalid email or short password, when I create a user, then I receive 422 with validation errors.
Given a non-admin token, when I hit admin-only routes, then I get 403 Forbidden.
Notes / Non-functional
Passwords hashed with Argon2.
Unique index on email.
Seed script for an initial admin.
As an administrator, I want to create and view users so that I can manage who can log in and own SSH keys.
Acceptance Criteria (G/W/T)
- [x] Given an admin token, when I POST /api/v1/users with email, password, role, then a user row is created with hashed password and returned (sans hash).
- [x] Given multiple users exist, when I GET /api/v1/users as admin, then I see a paginated list (email, role, is_active).
- [x] Given a user id, when I GET /api/v1/users/{id} as admin, then I see user details (no password).
- [x] Given invalid email or short password, when I create a user, then I receive 422 with validation errors.
- [x] Given a non-admin token, when I hit admin-only routes, then I get 403 Forbidden.
Notes / Non-functional
- [x] Passwords hashed with Argon2.
- [x] Unique index on email.
- [x] Seed script for an initial admin.
boris
added this to the Minimum Viable Product milestone 2025-09-23 14:18:43 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
As an administrator, I want to create and view users so that I can manage who can log in and own SSH keys.
Acceptance Criteria (G/W/T)
Notes / Non-functional
Implemented in keywarden/dev. Will merge with main later, but closing for now.