| | |
| | | import cc.mrbird.febs.system.service.IUserDataPermissionService; |
| | | import cc.mrbird.febs.system.service.IUserService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.authz.AuthorizationInfo; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.apache.shiro.session.ExpiredSessionException; |
| | |
| | | /** |
| | | * @author MrBird |
| | | */ |
| | | @Slf4j |
| | | @Controller("systemView") |
| | | @RequiredArgsConstructor |
| | | public class ViewController extends BaseController { |
| | |
| | | @GetMapping("login") |
| | | @ResponseBody |
| | | public Object login(HttpServletRequest request) { |
| | | if (request.getRequestURL().indexOf("api.shadowplan.cc") > 0) { |
| | | ModelAndView mav = new ModelAndView(); |
| | | mav.setViewName(FebsUtil.view("error/error")); |
| | | return mav; |
| | | } |
| | | |
| | | if (FebsUtil.isAjaxRequest(request)) { |
| | | throw new ExpiredSessionException(); |
| | | } else { |
| | |
| | | |
| | | |
| | | @GetMapping("/") |
| | | public String redirectIndex() { |
| | | public String redirectIndex(HttpServletRequest request) { |
| | | if (request.getRequestURL().indexOf("api.birdworld.vip") > 0) { |
| | | return FebsUtil.view("error/error"); |
| | | } |
| | | return "redirect:/index"; |
| | | } |
| | | |