Conversation
Signed-off-by: hgkim <hgkim@openerd.com>
…eased page size Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds root administrator verification features, integrates corresponding documentation, and refines API and project files.
- Introduced
AuthV2Controller,AuthService,RootAdminRepository, andRootAdminentity for checking root admin status - Added RestDocs tests and updated AsciiDoc docs (
auth.adoc,index.adoc) for the new endpoint - Enhanced API HTTP snippets, controller naming rules, and overhauled the README
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/app/rule/api/ControllerLayerRules.java | Allowed "check" prefix in controller naming rules |
| src/test/java/app/docs/user/RestAuthV2ControllerTest.java | Added RestDocs test for admin permissions endpoint |
| src/main/java/app/bottlenote/user/service/AuthService.java | Implemented checkAdminStatus service method |
| src/main/java/app/bottlenote/user/repository/RootAdminRepository.java | Added existsByUserId method |
| src/main/java/app/bottlenote/user/domain/RootAdmin.java | Created RootAdmin JPA entity |
| src/main/java/app/bottlenote/user/controller/AuthV2Controller.java | New endpoint for root admin permission check |
| src/docs/asciidoc/index.adoc | Included auth.adoc under auth section |
| src/docs/asciidoc/api/auth/auth.adoc | Documented root admin permission API |
| http/위스키/위스키_검색.http | Added @no-cookie-jar tags for testing snippets |
| git.environment-variables | Updated submodule commit reference |
| README.md | Revamped project description and images |
Comments suppressed due to low confidence (5)
src/test/java/app/docs/user/RestAuthV2ControllerTest.java:51
- [nitpick] The test method name 'login_test' is misleading; consider renaming it to something like 'checkAdminStatusTest' to reflect its purpose.
void login_test() throws Exception {
src/main/java/app/bottlenote/user/controller/AuthV2Controller.java:25
- The use of wildcard
ResponseEntity<?>is vague; specify the generic type, e.g.,ResponseEntity<GlobalResponse<Boolean>>, for clearer API contracts.
public ResponseEntity<?> checkAdminStatus() {
src/docs/asciidoc/index.adoc:89
- There appears to be an unmatched literal block delimiter (''' ) around the new auth section; verify AsciiDoc syntax so documentation builds correctly.
'''
README.md:11
- [nitpick] The project name capitalization is inconsistent; use 'Bottle Note' to match the repository name and maintain consistency.
## *bottle note*
src/test/java/app/docs/user/RestAuthV2ControllerTest.java:57
- Add a test case for when
SecurityContextUtil.getUserIdByContext()returns empty to cover the error path (UserException) in the controller.
//when
| 보틀노트는 위스키 애호가들이 모여 서로의 의견을 공유하고 <br/> | ||
| 더욱 즐겁고 유익한 시음 경험을 할 수 있도록 도와줍니다. | ||
|
|
There was a problem hiding this comment.
[nitpick] This paragraph duplicates content earlier in the README; consider removing the duplicate to streamline the document.
| 보틀노트는 위스키 애호가들이 모여 서로의 의견을 공유하고 <br/> | |
| 더욱 즐겁고 유익한 시음 경험을 할 수 있도록 도와줍니다. |
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
|



This pull request introduces significant updates to the
Bottle Noteproject, including new features for root administrator verification, enhancements to documentation, and updates to the API server's functionality and structure. Below is a summary of the most important changes, grouped by theme.Root Administrator Verification Features:
AuthV2Controllerfor root admin verification: Added a new controller (AuthV2Controller) to check if the currently logged-in user has root administrator permissions.RootAdmindomain entity: Introduced theRootAdminentity to represent root admin users in the database.RootAdminRepository: Implemented a repository to query root admin data, including a method to check if a user is a root admin.AuthServicelogic: Added service logic to handle root admin verification using theRootAdminRepository.AuthV2Controller: Created tests for the new controller, including RestDocs integration for documenting API responses.Documentation Updates:
auth.adocfile with detailed documentation for the new root admin verification API, including request and response examples.auth.adocfile in the main documentation index (index.adoc) under the "auth" section.API Enhancements:
@no-cookie-jarannotation for better testing and debugging.Codebase Improvements:
ControllerLayerRulestest file to comply with naming conventions.Miscellaneous Updates:
git.environment-variables.README.mdfile with detailed descriptions of the project features, images, and improved formatting.