소속기관이 default인 유저만 최고관리자 메뉴 접근 가능하도록 수정

main
이범준 1 year ago
parent 543032a761
commit e27900e5c0

@ -9,7 +9,9 @@ import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@ -56,9 +58,17 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
}
@RequestMapping(name="최고관리자 메인",value="/superUser/main.do")
public ModelAndView superUserMain() {
public ModelAndView superUserMain(HttpServletResponse hres) {
ModelAndView mav = new ModelAndView();
if(!currentUser().getInstitute().equals("default")) {
hres.setStatus(HttpStatus.FORBIDDEN.value());
mav.setViewName("jsonView");
mav.addObject("message","메뉴 접근 권한이 없습니다.");
} else {
mav.setViewName("fims/superUser-main");
}
return mav;
}

Loading…
Cancel
Save