Conversation
Signed-off-by: hgkim <hgkim@openerd.com>
…tatus Signed-off-by: hgkim <hgkim@openerd.com>
2 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces admin permissions management by adding a new controller, domain model, repository, and service to handle admin status checks. Key changes include the implementation of AuthV2Controller with an endpoint for admin verification, creation of the RootAdmin domain class and its corresponding repository, and a service layer to encapsulate admin-related business logic.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/app/bottlenote/user/service/AuthService.java | New service layer for checking admin status |
| src/main/java/app/bottlenote/user/repository/RootAdminRepository.java | Repository for querying admin presence via user ID |
| src/main/java/app/bottlenote/user/domain/RootAdmin.java | Domain model for representing admin users |
| src/main/java/app/bottlenote/user/controller/AuthV2Controller.java | Added endpoint to expose admin permissions check |
| git.environment-variables | Updated submodule commit reference |
Comments suppressed due to low confidence (1)
src/main/java/app/bottlenote/user/controller/AuthV2Controller.java:29
- [nitpick] The variable name 'is' is ambiguous. Consider renaming it to 'isAdmin' for improved clarity.
boolean is = authService.checkAdminStatus(currentUserId);
…ew allowed prefix Signed-off-by: hgkim <hgkim@openerd.com>
…te test class structure Signed-off-by: hgkim <hgkim@openerd.com>
|
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.



This pull request introduces a new feature for managing admin permissions in the application. The changes include the addition of a new controller (
AuthV2Controller), domain class (RootAdmin), repository (RootAdminRepository), and service (AuthService) to support admin status checks. Additionally, a submodule update is included.New Feature: Admin Permissions Management
AuthV2Controllerto handle API requests for checking admin status. It includes a new endpoint/api/v2/auth/admin/permissionsthat verifies if the current user is an admin.RootAdminentity to represent admin users in the database. It includes mappings foruser_idand a relationship with theUserentity.RootAdminRepositoryto interact with theRootAdminentity, including a method to check if a user ID exists as an admin.AuthServiceto encapsulate the business logic for admin status checks, utilizing theRootAdminRepository.Submodule Update
git.environment-variables.