-
In Progress
-
Worklog — SZ-39: Admin User Management (Create, List, Update, Delete Users)
Full-stack implementation: backend + frontend + auth + UX + regression tests
Total time: 7 hours 10 minutes (falls within original 6–8 hour estimate)
1. Backend: complete CRUD + security integration (1h 40m)
- Added
UpdateUserPayloadDTO (role-aware). - Implemented
PUT /api/users/{id}for updates andDELETE /api/users/{id}. - Added admin password-reset endpoint.
- Updated
UserService,UserServiceImpl, and repository queries. - Updated
UserDtomapping and pagination endpoint. - Added
/meand/me/passwordprofile endpoints. - Ensured Spring Security roles (
ADMIN,PROJECT_MANAGER) apply consistently. - Verified password-change logic with exception handling.
2. Frontend: Full user-management UI (Create, List, Update, Delete) (1h 55m)
- Implemented
CreateUserModal,EditUserModal, andUserDeleteModal. - Connected UI modals to backend API (axios calls in
api.ts). - Updated UserListPage with:
- pagination,
- role display,
- live table refresh,
- edit/delete actions,
- proper disable states.
- Implemented front-end form validation.
- Ensured smooth integration with AuthContext so UI respects real backend roles.
3. Role loading and form population (25m)
- Added role-loading API and caching.
- Auto-populated roles inside EditUserModal and CreateUserModal.
- Added UI blocking until roles load (prevents inconsistent state).
4. Self-delete protection (35m)
- Prevented the logged-in admin from deleting their own account.
- Added:
- disabled Delete button,
- gray styling,
- non-hoverable state,
- and a tooltip “You cannot delete your own account.”
5. Brand-consistent UI improvements (45m)
- Updated LoginPage to include real Sztab logo + italic gradient title.
- Synced login branding with AboutModal and Sidebar.
- Updated Change Password page to show icon.
- Added consistent typography and spacing across all user-management screens.
6. Regression tests — full backend flow validation (1h 10m)
- Updated
UserRegressionTestto handle new paginated JSON format. - Repaired JSONPath (
$.content[*].usernameinstead of$[*].username). - Verified create → list → delete → verify deletion logic.
- Added coverage for update and role-changing logic.
- Added
UserServiceImplTest.
7. Project restructuring: rename
sztab-ui→frontend(50m)- Renamed full folder tree using
git mv. - Updated docker-compose paths, Nginx mount path, Vite config, and Dockerfile context.
- Ran end-to-end smoke test:
mvn clean testnpm install && npm run builddocker compose up --build- Browser login, CRUD operations.
8. Final cleanup, commit, push, and merge (20m)
- Fixed tooltip wrapping.
- Ran final test suite — all passing.
- Committed rename + UI changes.
- Pushed
feature/sz-39-admin-user-managementand merged intowolnosc.
Final Summary
SZ-39 delivered a complete admin user-management system across both backend and frontend:
- Backend CRUD, DTOs, pagination, security rules
- Frontend add / edit / delete modals
- User list table with pagination
- Self-delete protection
- Polished UI (icons, branding, styling)
- Regression test coverage
- Repository rename + Docker alignment
Total time: 7h 10m (Full-stack feature)
- Added
| Type |
New Feature
|
| Priority |
Normal
|
| Assignee | |
| Version |
1.0
|
| Sprints |
n/a
|
| Customer |
n/a
|
Issue Votes (0)
Overview
Sztab currently allows full authentication and self-service profile updates, but there is no admin-facing UI or REST-endpoint layer to manage other users.
This issue introduces complete Admin User Management, enabling administrators to:
All operations will require the ADMIN role.
This is the foundation for onboarding developers, QA engineers, project managers, and other team members into Sztab.
Scope
1. Backend: REST Endpoints
Add new admin-only endpoints to
UserController:POST /api/users→ create a new userGET /api/users→ list all usersGET /api/users/{id}→ fetch user by IDPUT /api/users/{id}→ update user fieldsDELETE /api/users/{id}→ delete userDTOs required:
UserCreateDtoUserUpdateDtoUserDto(response)Business rules:
2. Backend: Service Layer
Extend
UserService:User createUser(UserCreateDto)List<User> getAllUsers()User updateUser(Long id, UserUpdateDto)void deleteUser(Long id)getCurrentUser,updateCurrentUser, etc.)Ensure:
3. Backend: Security Enforcement
All new endpoints must require:
Session-auth only (no impacts to JWT auth yet).
4. Unit + Integration Tests
Tests must validate:
5. OpenAPI / API Docs
Add complete API documentation:
This should appear automatically under Swagger UI.
6. README Update
Document the new Admin User Management API:
Acceptance Criteria
Estimate
6–8 hours, including testing and documentation.
Dependencies