Skip to content

Commit

Permalink
系统接口加了权限注解@RequiresPermissions未授权会提示无权限,暂时注释掉
Browse files Browse the repository at this point in the history
(无奈的修改,因为太多人问没权限的问题,请注重安全的项目,自行打开注解)
  • Loading branch information
zhangdaiscott committed Mar 7, 2023
1 parent c832354 commit 3c2038a
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Result<IPage<OssFile>> queryPageList(OssFile file,
@ResponseBody
@PostMapping("/upload")
@RequiresRoles("admin")
@RequiresPermissions("system:ossFile:upload")
//@RequiresPermissions("system:ossFile:upload")
public Result upload(@RequestParam("file") MultipartFile multipartFile) {
Result result = new Result();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Result<?> queryPageList(QuartzJob quartzJob, @RequestParam(name = "pageNo
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:add")
//@RequiresPermissions("system:quartzJob:add")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public Result<?> add(@RequestBody QuartzJob quartzJob) {
quartzJobService.saveAndScheduleJob(quartzJob);
Expand All @@ -94,7 +94,7 @@ public Result<?> add(@RequestBody QuartzJob quartzJob) {
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:edit")
//@RequiresPermissions("system:quartzJob:edit")
@RequestMapping(value = "/edit", method ={RequestMethod.PUT, RequestMethod.POST})
public Result<?> eidt(@RequestBody QuartzJob quartzJob) {
try {
Expand All @@ -113,7 +113,7 @@ public Result<?> eidt(@RequestBody QuartzJob quartzJob) {
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:delete")
//@RequiresPermissions("system:quartzJob:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
QuartzJob quartzJob = quartzJobService.getById(id);
Expand All @@ -132,7 +132,7 @@ public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:deleteBatch")
//@RequiresPermissions("system:quartzJob:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
if (ids == null || "".equals(ids.trim())) {
Expand All @@ -152,7 +152,7 @@ public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:pause")
//@RequiresPermissions("system:quartzJob:pause")
@GetMapping(value = "/pause")
@ApiOperation(value = "停止定时任务")
public Result<Object> pauseJob(@RequestParam(name = "id") String id) {
Expand All @@ -171,7 +171,7 @@ public Result<Object> pauseJob(@RequestParam(name = "id") String id) {
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:resume")
//@RequiresPermissions("system:quartzJob:resume")
@GetMapping(value = "/resume")
@ApiOperation(value = "启动定时任务")
public Result<Object> resumeJob(@RequestParam(name = "id") String id) {
Expand Down Expand Up @@ -272,7 +272,7 @@ public Result<?> importExcel(HttpServletRequest request, HttpServletResponse res
* @return
*/
@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:execute")
//@RequiresPermissions("system:quartzJob:execute")
@GetMapping("/execute")
public Result<?> execute(@RequestParam(name = "id", required = true) String id) {
QuartzJob quartzJob = quartzJobService.getById(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
*/
@AutoLog(value = "多数据源管理-分页列表查询")
@ApiOperation(value = "多数据源管理-分页列表查询", notes = "多数据源管理-分页列表查询")
@RequiresPermissions("system:datasource:list")
//@RequiresPermissions("system:datasource:list")
@GetMapping(value = "/list")
public Result<?> queryPageList(
SysDataSource sysDataSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public Result queryParentIds(
* @param sysDepart
* @return
*/
@RequiresPermissions("system:depart:add")
//@RequiresPermissions("system:depart:add")
@RequestMapping(value = "/add", method = RequestMethod.POST)
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
public Result<SysDepart> add(@RequestBody SysDepart sysDepart, HttpServletRequest request) {
Expand All @@ -199,7 +199,7 @@ public Result<SysDepart> add(@RequestBody SysDepart sysDepart, HttpServletReques
* @param sysDepart
* @return
*/
@RequiresPermissions("system:depart:edit")
//@RequiresPermissions("system:depart:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
public Result<SysDepart> edit(@RequestBody SysDepart sysDepart, HttpServletRequest request) {
Expand Down Expand Up @@ -227,7 +227,7 @@ public Result<SysDepart> edit(@RequestBody SysDepart sysDepart, HttpServletReque
* @param id
* @return
*/
@RequiresPermissions("system:depart:delete")
//@RequiresPermissions("system:depart:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
public Result<SysDepart> delete(@RequestParam(name="id",required=true) String id) {
Expand All @@ -253,7 +253,7 @@ public Result<SysDepart> delete(@RequestParam(name="id",required=true) String id
* @param ids
* @return
*/
@RequiresPermissions("system:depart:deleteBatch")
//@RequiresPermissions("system:depart:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
public Result<SysDepart> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
Expand Down Expand Up @@ -377,7 +377,7 @@ public int compare(SysDepart arg0, SysDepart arg1) {
* @param response
* @return
*/
@RequiresPermissions("system:depart:importExcel")
//@RequiresPermissions("system:depart:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
@CacheEvict(value= {CacheConstant.SYS_DEPARTS_CACHE,CacheConstant.SYS_DEPART_IDS_CACHE}, allEntries=true)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public Result<?> queryPageList(SysDepartRole sysDepartRole,
* @param sysDepartRole
* @return
*/
@RequiresPermissions("system:depart:role:add")
//@RequiresPermissions("system:depart:role:add")
@ApiOperation(value="部门角色-添加", notes="部门角色-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody SysDepartRole sysDepartRole) {
Expand All @@ -119,7 +119,7 @@ public Result<?> add(@RequestBody SysDepartRole sysDepartRole) {
* @return
*/
@ApiOperation(value="部门角色-编辑", notes="部门角色-编辑")
@RequiresPermissions("system:depart:role:edit")
//@RequiresPermissions("system:depart:role:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit(@RequestBody SysDepartRole sysDepartRole) {
sysDepartRoleService.updateById(sysDepartRole);
Expand All @@ -134,7 +134,7 @@ public Result<?> edit(@RequestBody SysDepartRole sysDepartRole) {
*/
@AutoLog(value = "部门角色-通过id删除")
@ApiOperation(value="部门角色-通过id删除", notes="部门角色-通过id删除")
@RequiresPermissions("system:depart:role:delete")
//@RequiresPermissions("system:depart:role:delete")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
sysDepartRoleService.removeById(id);
Expand All @@ -149,7 +149,7 @@ public Result<?> delete(@RequestParam(name="id",required=true) String id) {
*/
@AutoLog(value = "部门角色-批量删除")
@ApiOperation(value="部门角色-批量删除", notes="部门角色-批量删除")
@RequiresPermissions("system:depart:role:deleteBatch")
//@RequiresPermissions("system:depart:role:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.sysDepartRoleService.removeByIds(Arrays.asList(ids.split(",")));
Expand Down Expand Up @@ -189,7 +189,7 @@ public Result<List<SysDepartRole>> getDeptRoleList(@RequestParam(value = "depart
* @param json
* @return
*/
@RequiresPermissions("system:depart:role:userAdd")
//@RequiresPermissions("system:depart:role:userAdd")
@RequestMapping(value = "/deptRoleUserAdd", method = RequestMethod.POST)
public Result<?> deptRoleAdd(@RequestBody JSONObject json) {
String newRoleId = json.getString("newRoleId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public Result<List<DictModel>> queryTableData(DictQuery query,
* @param sysDict
* @return
*/
@RequiresPermissions("system:dict:add")
//@RequiresPermissions("system:dict:add")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public Result<SysDict> add(@RequestBody SysDict sysDict) {
Result<SysDict> result = new Result<SysDict>();
Expand All @@ -396,7 +396,7 @@ public Result<SysDict> add(@RequestBody SysDict sysDict) {
* @param sysDict
* @return
*/
@RequiresPermissions("system:dict:edit")
//@RequiresPermissions("system:dict:edit")
@RequestMapping(value = "/edit", method = { RequestMethod.PUT,RequestMethod.POST })
public Result<SysDict> edit(@RequestBody SysDict sysDict) {
Result<SysDict> result = new Result<SysDict>();
Expand All @@ -418,7 +418,7 @@ public Result<SysDict> edit(@RequestBody SysDict sysDict) {
* @param id
* @return
*/
@RequiresPermissions("system:dict:delete")
//@RequiresPermissions("system:dict:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDict> delete(@RequestParam(name="id",required=true) String id) {
Expand All @@ -437,7 +437,7 @@ public Result<SysDict> delete(@RequestParam(name="id",required=true) String id)
* @param ids
* @return
*/
@RequiresPermissions("system:dict:deleteBatch")
//@RequiresPermissions("system:dict:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
@CacheEvict(value= {CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDict> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
Expand Down Expand Up @@ -527,7 +527,7 @@ public ModelAndView exportXls(SysDict sysDict,HttpServletRequest request) {
* @param
* @return
*/
@RequiresPermissions("system:dict:importExcel")
//@RequiresPermissions("system:dict:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public Result<IPage<SysDictItem>> queryPageList(SysDictItem sysDictItem,@Request
* @功能:新增
* @return
*/
@RequiresPermissions("system:dict:item:add")
//@RequiresPermissions("system:dict:item:add")
@RequestMapping(value = "/add", method = RequestMethod.POST)
@CacheEvict(value= {CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDictItem> add(@RequestBody SysDictItem sysDictItem) {
Expand All @@ -95,7 +95,7 @@ public Result<SysDictItem> add(@RequestBody SysDictItem sysDictItem) {
* @param sysDictItem
* @return
*/
@RequiresPermissions("system:dict:item:edit")
//@RequiresPermissions("system:dict:item:edit")
@RequestMapping(value = "/edit", method = { RequestMethod.PUT,RequestMethod.POST })
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDictItem> edit(@RequestBody SysDictItem sysDictItem) {
Expand All @@ -119,7 +119,7 @@ public Result<SysDictItem> edit(@RequestBody SysDictItem sysDictItem) {
* @param id
* @return
*/
@RequiresPermissions("system:dict:item:delete")
//@RequiresPermissions("system:dict:item:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDictItem> delete(@RequestParam(name="id",required=true) String id) {
Expand All @@ -141,7 +141,7 @@ public Result<SysDictItem> delete(@RequestParam(name="id",required=true) String
* @param ids
* @return
*/
@RequiresPermissions("system:dict:item:deleteBatch")
//@RequiresPermissions("system:dict:item:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
@CacheEvict(value={CacheConstant.SYS_DICT_CACHE, CacheConstant.SYS_ENABLE_DICT_CACHE}, allEntries=true)
public Result<SysDictItem> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public Result<?> clearRedis() {
* @param id
* @return
*/
@RequiresPermissions("system:getway:delete")
//@RequiresPermissions("system:getway:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
sysGatewayRouteService.deleteById(id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public Result<String> checkPermDuplication(@RequestParam(name = "id", required =
* @param id
* @return
*/
@RequiresPermissions("system:permission:delete")
//@RequiresPermissions("system:permission:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<SysPermission> delete(@RequestParam(name = "id", required = true) String id) {
Result<SysPermission> result = new Result<>();
Expand All @@ -441,7 +441,7 @@ public Result<SysPermission> delete(@RequestParam(name = "id", required = true)
* @param ids
* @return
*/
@RequiresPermissions("system:permission:deleteBatch")
//@RequiresPermissions("system:permission:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
public Result<SysPermission> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
Result<SysPermission> result = new Result<>();
Expand Down Expand Up @@ -912,7 +912,7 @@ public Result<SysPermissionDataRule> editPermissionRule(@RequestBody SysPermissi
* @param id
* @return
*/
@RequiresPermissions("system:permission:deleteRule")
//@RequiresPermissions("system:permission:deleteRule")
@RequestMapping(value = "/deletePermissionRule", method = RequestMethod.DELETE)
public Result<SysPermissionDataRule> deletePermissionRule(@RequestParam(name = "id", required = true) String id) {
Result<SysPermissionDataRule> result = new Result<SysPermissionDataRule>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public Result<SysRole> edit(@RequestBody SysRole role) {
* @param id
* @return
*/
@RequiresPermissions("system:role:delete")
//@RequiresPermissions("system:role:delete")
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
sysRoleService.deleteRole(id);
Expand All @@ -191,7 +191,7 @@ public Result<?> delete(@RequestParam(name="id",required=true) String id) {
* @param ids
* @return
*/
@RequiresPermissions("system:role:deleteBatch")
//@RequiresPermissions("system:role:deleteBatch")
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
public Result<SysRole> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
Result<SysRole> result = new Result<SysRole>();
Expand Down Expand Up @@ -252,7 +252,7 @@ public Result<List<SysRole>> queryall() {
*
* @return
*/
@RequiresPermissions("system:role:queryallNoByTenant")
//@RequiresPermissions("system:role:queryallNoByTenant")
@RequestMapping(value = "/queryallNoByTenant", method = RequestMethod.GET)
public Result<List<SysRole>> queryallNoByTenant() {
Result<List<SysRole>> result = new Result<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Result<?> queryPageList(SysRoleIndex sysRoleIndex,
* @param sysRoleIndex
* @return
*/
@RequiresPermissions("system:roleindex:add")
//@RequiresPermissions("system:roleindex:add")
@AutoLog(value = "角色首页配置-添加")
@ApiOperation(value = "角色首页配置-添加", notes = "角色首页配置-添加")
@PostMapping(value = "/add")
Expand All @@ -83,7 +83,7 @@ public Result<?> add(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest r
* @param sysRoleIndex
* @return
*/
@RequiresPermissions("system:roleindex:edit")
//@RequiresPermissions("system:roleindex:edit")
@AutoLog(value = "角色首页配置-编辑")
@ApiOperation(value = "角色首页配置-编辑", notes = "角色首页配置-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
Expand Down
Loading

0 comments on commit 3c2038a

Please sign in to comment.