Skip to content

Commit

Permalink
Merge pull request #201 from PlanIt-Project/BE
Browse files Browse the repository at this point in the history
Be
  • Loading branch information
moonjin-kim authored Apr 22, 2024
2 parents 9bad5a5 + 5026d0f commit 31f36c3
Show file tree
Hide file tree
Showing 9 changed files with 923 additions and 19 deletions.
612 changes: 612 additions & 0 deletions logs/access-2024-04-22.0.log

Large diffs are not rendered by default.

306 changes: 306 additions & 0 deletions logs/access-2024-04-23.0.log

Large diffs are not rendered by default.

Empty file added logs/error-2024-04-23.0.log
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) {
"/member/refresh",
"/member/email/**",
"/login/**",
"/image/**").permitAll()
"/image/**",
"/error").permitAll()
.requestMatchers("/admin/**").hasAnyAuthority("ADMIN")
.anyRequest().authenticated()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public String grantEmployeeAuth(Long member_id, TrainerRequestDto trainerRequest
employeeRepository.save(Employee.builder()
.member(memberToEmployee)
.career(trainerRequestDto.getCareer())
.trainerMessage(trainerRequestDto.getTrainerMessage())
.build());

return "직원 설정 완료";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.sideProject.PlanIT.domain.controller_test_module;
package com.controller_test_module;

import com.sideProject.PlanIT.domain.user.entity.Member;
import com.sideProject.PlanIT.domain.user.entity.enums.MemberRole;
import org.springframework.security.test.context.support.WithSecurityContext;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.sideProject.PlanIT.domain.controller_test_module;
package com.controller_test_module;

import com.sideProject.PlanIT.domain.user.entity.Member;
import com.sideProject.PlanIT.domain.user.entity.enums.Gender;
import com.sideProject.PlanIT.domain.user.entity.enums.MemberRole;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package com.sideProject.PlanIT.domain.program.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sideProject.PlanIT.common.security.JwtAccessDeniedHandler;
import com.sideProject.PlanIT.common.security.JwtAuthenticationEntryPoint;
import com.sideProject.PlanIT.common.util.JwtUtil;
import com.sideProject.PlanIT.config.SecurityConfig;
import com.sideProject.PlanIT.domain.controller_test_module.WithMockCustomMember;
import com.sideProject.PlanIT.domain.program.dto.request.RegistrationRequestDto;
import com.sideProject.PlanIT.domain.program.service.ProgramService;
import com.sideProject.PlanIT.domain.user.entity.enums.MemberRole;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.mockito.BDDMockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.sideProject.PlanIT.domain.reservation.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.sideProject.PlanIT.common.response.ApiResponse;
import com.sideProject.PlanIT.common.security.JwtAccessDeniedHandler;
import com.sideProject.PlanIT.common.security.JwtAuthenticationEntryPoint;
import com.sideProject.PlanIT.common.util.JwtUtil;
import com.sideProject.PlanIT.config.SecurityConfig;
import com.sideProject.PlanIT.domain.program.controller.ProgramAdminController;
import com.sideProject.PlanIT.domain.program.dto.request.ProgramModifyRequestDto;
import com.sideProject.PlanIT.domain.program.service.ProgramService;
import com.sideProject.PlanIT.domain.reservation.dto.reqeust.ChangeReservationRequestDto;
import com.sideProject.PlanIT.domain.reservation.dto.reqeust.ReservationRequestDto;
import com.sideProject.PlanIT.domain.reservation.dto.response.ReservationResponseDto;
import com.sideProject.PlanIT.domain.reservation.service.ReservationService;
import com.sideProject.PlanIT.domain.user.entity.enums.MemberRole;
import org.junit.jupiter.api.DisplayName;
Expand All @@ -23,7 +18,6 @@
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.Import;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.MediaType;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
Expand All @@ -32,9 +26,6 @@
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.WebApplicationContext;

import java.time.LocalDate;
Expand All @@ -43,7 +34,6 @@
import java.util.Collections;
import java.util.List;

import static org.junit.jupiter.api.Assertions.*;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.authentication;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
Expand Down

0 comments on commit 31f36c3

Please sign in to comment.