27 lines
928 B
Java
27 lines
928 B
Java
package com.kri.contact.server.controller;
|
|
|
|
import com.kri.common.webmvc.RequestUserContext;
|
|
import com.kri.contact.server.dto.user.RoleInfoDto;
|
|
import com.kri.contact.server.service.RoleService;
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import java.util.List;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@RestController
|
|
@RequestMapping("/api/v1/role")
|
|
@RequiredArgsConstructor
|
|
@Tag(name = "Role", description = "권한 관리 API")
|
|
public class RoleController {
|
|
|
|
private final RoleService roleService;
|
|
|
|
@Operation(summary = "권한 목록 조회")
|
|
@GetMapping()
|
|
public List<RoleInfoDto> getRoleList(RequestUserContext ctx) {
|
|
return roleService.getRoleList(ctx.getUserRole());
|
|
}
|
|
} |