提交 135db225 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

V2.0 版本权限测试注解去掉,简化使用

上级 c1c2f1e4
...@@ -83,7 +83,6 @@ public class SysDepartController { ...@@ -83,7 +83,6 @@ public class SysDepartController {
* @param sysDepart * @param sysDepart
* @return * @return
*/ */
@RequiresRoles({"admin"})
@RequestMapping(value = "/add", method = RequestMethod.POST) @RequestMapping(value = "/add", method = RequestMethod.POST)
public Result<SysDepart> add(@RequestBody SysDepart sysDepart, HttpServletRequest request) { public Result<SysDepart> add(@RequestBody SysDepart sysDepart, HttpServletRequest request) {
Result<SysDepart> result = new Result<SysDepart>(); Result<SysDepart> result = new Result<SysDepart>();
...@@ -105,7 +104,6 @@ public class SysDepartController { ...@@ -105,7 +104,6 @@ public class SysDepartController {
* @param sysDepart * @param sysDepart
* @return * @return
*/ */
@RequiresRoles({"admin"})
@RequestMapping(value = "/edit", method = RequestMethod.PUT) @RequestMapping(value = "/edit", method = RequestMethod.PUT)
public Result<SysDepart> edit(@RequestBody SysDepart sysDepart, HttpServletRequest request) { public Result<SysDepart> edit(@RequestBody SysDepart sysDepart, HttpServletRequest request) {
String username = JwtUtil.getUserNameByToken(request); String username = JwtUtil.getUserNameByToken(request);
...@@ -129,7 +127,6 @@ public class SysDepartController { ...@@ -129,7 +127,6 @@ public class SysDepartController {
* @param id * @param id
* @return * @return
*/ */
@RequiresRoles({"admin"})
@RequestMapping(value = "/delete", method = RequestMethod.DELETE) @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<SysDepart> delete(@RequestParam(name="id",required=true) String id) { public Result<SysDepart> delete(@RequestParam(name="id",required=true) String id) {
...@@ -153,7 +150,6 @@ public class SysDepartController { ...@@ -153,7 +150,6 @@ public class SysDepartController {
* @param ids * @param ids
* @return * @return
*/ */
@RequiresRoles({"admin"})
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
public Result<SysDepart> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { public Result<SysDepart> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
......
...@@ -127,7 +127,6 @@ public class SysRoleController { ...@@ -127,7 +127,6 @@ public class SysRoleController {
* @param role * @param role
* @return * @return
*/ */
@RequiresRoles({"admin"})
@RequestMapping(value = "/edit", method = RequestMethod.PUT) @RequestMapping(value = "/edit", method = RequestMethod.PUT)
public Result<SysRole> edit(@RequestBody SysRole role) { public Result<SysRole> edit(@RequestBody SysRole role) {
Result<SysRole> result = new Result<SysRole>(); Result<SysRole> result = new Result<SysRole>();
...@@ -151,7 +150,6 @@ public class SysRoleController { ...@@ -151,7 +150,6 @@ public class SysRoleController {
* @param id * @param id
* @return * @return
*/ */
@RequiresRoles({"admin"})
@CacheEvict(value="loginUser_cacheRules", allEntries=true) @CacheEvict(value="loginUser_cacheRules", allEntries=true)
@RequestMapping(value = "/delete", method = RequestMethod.DELETE) @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result<SysRole> delete(@RequestParam(name="id",required=true) String id) { public Result<SysRole> delete(@RequestParam(name="id",required=true) String id) {
...@@ -174,7 +172,6 @@ public class SysRoleController { ...@@ -174,7 +172,6 @@ public class SysRoleController {
* @param ids * @param ids
* @return * @return
*/ */
@RequiresRoles({"admin"})
@CacheEvict(value="loginUser_cacheRules", allEntries=true) @CacheEvict(value="loginUser_cacheRules", allEntries=true)
@RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE) @RequestMapping(value = "/deleteBatch", method = RequestMethod.DELETE)
public Result<SysRole> deleteBatch(@RequestParam(name="ids",required=true) String ids) { public Result<SysRole> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册