Skip to content

New Feature: Admin Permissions Management - #409

Merged
Whale0928 merged 4 commits into
devfrom
feat/407
Jun 19, 2025
Merged

New Feature: Admin Permissions Management#409
Whale0928 merged 4 commits into
devfrom
feat/407

Conversation

@Whale0928

Copy link
Copy Markdown
Collaborator

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

  • Controller Implementation: Added AuthV2Controller to handle API requests for checking admin status. It includes a new endpoint /api/v2/auth/admin/permissions that verifies if the current user is an admin.
  • Domain Class: Introduced RootAdmin entity to represent admin users in the database. It includes mappings for user_id and a relationship with the User entity.
  • Repository: Created RootAdminRepository to interact with the RootAdmin entity, including a method to check if a user ID exists as an admin.
  • Service Layer: Added AuthService to encapsulate the business logic for admin status checks, utilizing the RootAdminRepository.

Submodule Update

  • Submodule Reference: Updated submodule commit reference in git.environment-variables.

Copilot AI review requested due to automatic review settings June 17, 2025 16:13
@Whale0928 Whale0928 linked an issue Jun 17, 2025 that may be closed by this pull request
2 tasks

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@sonarqubecloud

Copy link
Copy Markdown

@Whale0928 Whale0928 changed the title Feat/407 New Feature: Admin Permissions Management Jun 18, 2025
@Whale0928
Whale0928 merged commit 432f471 into dev Jun 19, 2025
3 checks passed
@Whale0928
Whale0928 deleted the feat/407 branch June 19, 2025 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

APP 개발/운영 환경 스왑 권한 확인 API 구현

3 participants