[ai-assisted] feat(user): 관리자 사용자 삭제 API 추가#378
Merged
Conversation
Issue: - #376 Why: - Admin 회원 목록에는 사용자 삭제 액션이 있지만 기본 사용자 관리 컨트롤러에 DELETE /api/mgmt/users/{id} 엔드포인트가 없어 클라이언트 연결이 불가능했다. What: - 기본 UserMgmtController에 features:user admin 권한의 DELETE /{id} 엔드포인트를 추가했다. - UserMgmtApi에는 default delete 계약을 추가해 커스텀 구현체 호환성을 유지했다. - ApplicationUserServiceImpl.delete 성공 시 사용자 캐시를 정리하도록 보강했다. - user README와 starter README에 삭제 API와 응답 형식을 문서화했다. Validation: - ./gradlew :studio-platform-user:compileJava :studio-platform-user-default:test :starter:studio-platform-starter-user:test: 성공 - ./gradlew test: 성공 - git diff --check: 성공
donghyuck
commented
Apr 29, 2026
Owner
Author
donghyuck
left a comment
There was a problem hiding this comment.
Self-review completed.
확인 결과:
- PR diff는 이슈 #376 범위의 사용자 관리 삭제 API, 캐시 정리, 테스트, README 변경만 포함합니다.
DELETE /api/mgmt/users/{id}는 기존 사용자 관리 admin 권한(features:user/admin)을 사용합니다.UserMgmtApi는 default 메서드로 확장되어 커스텀 컨트롤러 구현체의 컴파일 호환성을 유지합니다.- 기본 삭제 정책은 기존
ApplicationUserService.delete물리 삭제이며, 스키마상 user property/role/group membership은 cascade 삭제됩니다. - targeted tests, full
./gradlew test,git diff --check, gitleaks check가 통과했습니다.
추가 수정 필요 사항은 발견하지 못했습니다. soft delete, self-delete 방지, last-admin 보호 같은 운영 정책은 별도 요구사항으로 다루는 편이 맞습니다.
donghyuck
commented
Apr 29, 2026
Owner
Author
donghyuck
left a comment
There was a problem hiding this comment.
Review completed after re-checking PR #378.
Findings:
- Blocking issue: none
- Security/authorization:
DELETE /api/mgmt/users/{id}uses the existingfeatures:user/adminguard, consistent with password reset/enable/disable admin APIs. - Compatibility:
UserMgmtApi.deleteis a default method, so existing custom implementations are not forced to implement the new method at compile time. - Data behavior: the endpoint exposes the existing
ApplicationUserService.delete(Long userId)physical-delete policy; user properties, role mappings, and group memberships are covered by cascade constraints in the user schema. - Cache behavior: user id cache and username cache are evicted after successful delete.
- Tests/checks: targeted tests, full
./gradlew test,git diff --check, and gitleaks all pass.
No additional code changes are required for the current issue scope. If self-delete prevention, last-admin protection, or soft delete is required, it should be handled as an explicit policy issue rather than inferred into this endpoint wiring fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
DELETE /api/mgmt/users/{id}가 없어 클라이언트에서 삭제 기능을 연결할 수 없었습니다.ApplicationUserService.delete(Long userId)는 이미 존재하므로 기본 관리 컨트롤러에 엔드포인트를 노출합니다.What
UserMgmtController에DELETE /{id}엔드포인트를 추가했습니다.features:useradmin 권한을 적용했습니다.204 No Content로 반환합니다.UserMgmtApi에는 default 메서드로 delete 계약을 추가해 커스텀 컨트롤러 구현체의 컴파일 호환성을 유지했습니다.ApplicationUserServiceImpl.delete성공 시 user id cache와 username cache를 정리하도록 보강했습니다.Related Issues
Validation
./gradlew :studio-platform-user:compileJava :studio-platform-user-default:test :starter:studio-platform-starter-user:test./gradlew testgit diff --checkRisk / Rollback
ApplicationUserService.delete의 물리 삭제 정책을 그대로 사용합니다. user property, role, group membership은 스키마상 cascade 삭제 대상입니다. 별도 soft-delete 정책이 필요한 경우 후속 정책 이슈로 분리해야 합니다.AI / Subagent Usage
Checklist
AI-Assistedvalue is correct