update:垂直越权接口补充权限注解
This commit is contained in:
+3
@@ -18,6 +18,7 @@ import com.jero.modules.system.service.ISysAnnouncementSendService;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -199,6 +200,7 @@ public class SysAnnouncementSendController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getMyAnnouncementSend")
|
@GetMapping(value = "/getMyAnnouncementSend")
|
||||||
@ApiOperationSupport(order = 8)
|
@ApiOperationSupport(order = 8)
|
||||||
|
@RequiresPermissions("system:userAnnouncementList:search")
|
||||||
public Result<IPage<AnnouncementSendModel>> getMyAnnouncementSend(AnnouncementSendModel announcementSendModel,
|
public Result<IPage<AnnouncementSendModel>> getMyAnnouncementSend(AnnouncementSendModel announcementSendModel,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||||
@@ -229,6 +231,7 @@ public class SysAnnouncementSendController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping(value = "/readAll")
|
@PostMapping(value = "/readAll")
|
||||||
@ApiOperationSupport(order = 10)
|
@ApiOperationSupport(order = 10)
|
||||||
|
@RequiresPermissions("system:userAnnouncementList:allLabelsRead")
|
||||||
public Result<SysAnnouncementSend> readAll() {
|
public Result<SysAnnouncementSend> readAll() {
|
||||||
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
|
||||||
String userId = sysUser.getId();
|
String userId = sysUser.getId();
|
||||||
|
|||||||
+2
@@ -26,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -385,6 +386,7 @@ public class SysPermissionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/saveRolePermission")
|
@PostMapping("/saveRolePermission")
|
||||||
|
@RequiresPermissions("sys:role:permission")
|
||||||
public Result<String> saveRolePermission(@RequestBody JSONObject json) {
|
public Result<String> saveRolePermission(@RequestBody JSONObject json) {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
try {
|
try {
|
||||||
|
|||||||
+1
@@ -457,6 +457,7 @@ public class SysUserController {
|
|||||||
*/
|
*/
|
||||||
// @RequestMapping(value = "/changePassword", method = RequestMethod.PUT)
|
// @RequestMapping(value = "/changePassword", method = RequestMethod.PUT)
|
||||||
@PostMapping("/changePassword")
|
@PostMapping("/changePassword")
|
||||||
|
@RequiresPermissions("user:password")
|
||||||
public Result<T> changePassword(@RequestBody SysUser sysUser) {
|
public Result<T> changePassword(@RequestBody SysUser sysUser) {
|
||||||
SysUser u = this.sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, sysUser.getUsername()));
|
SysUser u = this.sysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, sysUser.getUsername()));
|
||||||
if (u == null) {
|
if (u == null) {
|
||||||
|
|||||||
+1
@@ -75,6 +75,7 @@ public class LawsHomeSearchController {
|
|||||||
@AutoLog(value = "首页-一般检索导出", operateType = CommonConstant.OPERATE_TYPE_6)
|
@AutoLog(value = "首页-一般检索导出", operateType = CommonConstant.OPERATE_TYPE_6)
|
||||||
@ApiOperation(value="首页-一般检索导出", notes="首页-一般检索导出")
|
@ApiOperation(value="首页-一般检索导出", notes="首页-一般检索导出")
|
||||||
@GetMapping(value = "/normalSearchExportExcel")
|
@GetMapping(value = "/normalSearchExportExcel")
|
||||||
|
@RequiresPermissions("dashboard:generalSearch:export")
|
||||||
public ModelAndView normalSearchExportExcel(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
public ModelAndView normalSearchExportExcel(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
||||||
return lawsHomeSearchService.normalSearchExportExcel(lawsHomeNormalSearchDTO);
|
return lawsHomeSearchService.normalSearchExportExcel(lawsHomeNormalSearchDTO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user